| - depth: an integer representing the current dept | | - depth: an integer representing the current dept |
| h in the hierarchy (starting with 0) | | h in the hierarchy (starting with 0) |
| - depthrange: can be used in a for loop, for exam | | - depthrange: can be used in a for loop, for exam |
| ple to display "-" for every step in the hierarchy | | ple to display "-" for every step in the hierarchy |
| . | | . |
| | | |
| ## Example | | ## Example |
| | | |
t | | t | The following example displays a simple select box |
| | | which will jump to the selected forum as soon as |
| | | the value is changed.
|
| | |
|
| | | {% load sphboard_extras %}
|
| | |
|
| <select name="category" onchange="if(this.valu | | <select name="category" onchange="if(this.valu |
| e) document.location = this.value;" class="sphboar | | e) document.location = this.value;" class="sphboar |
| d_selectcategory"> | | d_selectcategory"> |
| <option value="">Jump to category</option> | | <option value="">Jump to category</option> |
| <option value="">------------------</option> | | <option value="">------------------</option> |
| | | |
| {% sphboard_recursive_category_iterator %} | | {% sphboard_recursive_category_iterator %} |
| <option value="{{ category.get_absolute_ur | | <option value="{{ category.get_absolute_ur |
| l }}">{% for i in depthrange %}--{% endfor %} {{ c | | l }}">{% for i in depthrange %}--{% endfor %} {{ c |
| ategory.name }}</option> | | ategory.name }}</option> |