Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Forum template tags

Board / TemplateTags

Back to Snip <-- Previous Change | Next Change -->

Diff Summary
Title Forum template tags Forum template tags
Date 2008-04-12 17:01:01 2008-04-12 17:07:43
Editor Herbert Poul Herbert Poul
Tags

2008-04-12 17:01:01 by Herbert Poul
2008-04-12 17:07:43 by Herbert Poul
16 - depth: an integer representing the current dept16 - depth: an integer representing the current dept
>h in the hierarchy (starting with 0)>h in the hierarchy (starting with 0)
17 - depthrange: can be used in a for loop, for exam17 - 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
>.>.
1818
19## Example19## Example
2020
tt21The following example displays a simple select box
 > which will jump to the selected forum as soon as 
 >the value is changed.
22
23    {% load sphboard_extras %}
24
21    <select name="category" onchange="if(this.valu25    <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">
22      <option value="">Jump to category</option>26      <option value="">Jump to category</option>
23      <option value="">------------------</option>27      <option value="">------------------</option>
>>
24      {% sphboard_recursive_category_iterator %}28      {% sphboard_recursive_category_iterator %}
25        <option value="{{ category.get_absolute_ur29        <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>


Powered by Sphene Community Tools