Haven't tried Richard's way, but here is how I do it.
You need landing areas for your data.
Something like this:
<div id="tabs"><ul>
<li><a href="{{=URL('classtimes',args='tab_1')}}">Monday</a></
li>
<li><a href="{{=URL('classtimes',args='tab_2')}}">Tuesday</
a></
li>
<li><a href="{{=URL('classtimes',args='tab_3')}}">Wednesday</
a></
li>
<li><a href="{{=URL('classtimes',args='tab_4')}}">Thursday</
a></
li>
<li><a href="{{=URL('classtimes',args='tab_5')}}">Friday</a></
li>
<li><a href="{{=URL('classtimes',args='tab_6')}}">Saturday</
a></
li>
<li><a href="{{=URL('classtimes',args='tab_7')}}">Sunday</
a></
li>
<li><a href="{{=URL('classtimes',args=['week'])}}">Week</
a></li>
</ul>
</div><!--tabs-->
<div id="tab_1">
{{=stuff_to_go_on_tab_1}}
</div>
<div id="tab_2">
{{=stuff_to_go_on_tab_2}}
</div>
.
.
.
In the controller:
def function_associated_with_the_view():
## get records for tab 1 from the db
## build the table of info for tab 1
stuff_to_go_on_tab_1 = TABLE(...yada, yada) # or whatever
## get records for tab from the db
## build the table of info for tab 2
stuff_to_go_on_tab_2 = TABLE(...yada, yada)
...
return dict(
stuff_to_go_on_tab_1=stuff_to_go_on_tab_1,
stuff_to_go_on_tab_2=stuff_to_go_on_tab_2,
...
)
Also note you don't need to use line continuation inside a tuple,
list, or dictionary.
URL doesn't need the list delimiters if there's only one arg.
On Oct 21, 1:12 pm, Richard Vézina <
ml.richard.vez...@gmail.com>
wrote:
> Here the api of tabs plugin :
>
> selected <
http://jqueryui.com/demos/tabs/#option-selected>NumberDefault:0
>
> Zero-based index of the tab to be selected on initialization. To set all
> tabs to unselected pass -1 as value.
> Code examplesInitialize a tabs with the selected option specified.