If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
Section and Category Pull-down Menus
Creating a pull-down menu (also known as a “jump” or “select” or popup menu) of articles is very simple. What follows uses JavaScript to power it, but can be changed to use another programming language if desired.
In “jump-menu”, an article form:
<option value="<txp:permlink />"><txp:title /></option>
Page examples (for any version)
Examples to use within a “page”.
Replace
- section-name with the name of your section
- category-name with the name of your category
-
- with how many options to generate (to get 5 options, enter 5). If you do not specify a limit, the default number, 10, will be used.
Drop-down by section
<form action="">
<select onchange="document.location=options[selectedIndex].value;">
<option value="" selected="selected">Articles In section-name</option>
<txp:article_custom section="section-name" form="jump-menu" limit="#"" />
</select>
</form>
Drop-down by category
<form action="">
<select onchange="document.location=options[selectedIndex].value;">
<option value="" selected="selected">Articles in category-name</option>
<txp:article_custom category="category-name" form="jump-menu" limit="#" />
</select>
</form>
Pull-down for Section and Category
You can also mix section and category, which would return articles from section-name that also are in category-name.
<form action="">
<select onchange="document.location=options[selectedIndex].value;">
<option value="" selected="selected">Articles in section-name and category-name</option>
<txp:article_custom section="section-name" category="category-name" form="jump-menu" limit="#" />
</select>
</form>