Page 1 of 1

Tabs within {Content}

Posted: Mon Nov 20, 2006 2:54 pm
by dburniston
I have a bunch of workshop description pages that we'd like to breakdown the content into smaller chunks.

I have a horizontal dropdown Menu that gets them to the page for a specific workshop and I'd like to add tabs to the content section of the workshop pages so that the tabs give them the options of seeing Description, Objectives, Register without having to create seperate pages.

I've been able to add CSS tabs but they require linking to seperate pages to be displayed in the tab area. Is there a way to use multiple content blocks and have only 1 displayed when its tab is clicked?

Re: Tabs within {Content}

Posted: Mon Nov 20, 2006 3:28 pm
by cyberman
You can create multiple content blocks - please look at help for {content}-Tag. You can hide this content blocks and show them with a little bit of javascript :) ...

Re: Tabs within {Content}

Posted: Mon Nov 20, 2006 7:17 pm
by dburniston
I knew about the multiple content tags, and I can set up the template to use them. Can someone point me to some js code to detect what tab has been clicked and display the corresponding content? I tried to find something in the forum and I've tried a few tab javascripts I could find from google, but they throw a lot of Smarty errors when I try to add them.

Thanks,

...Dave

Re: Tabs within {Content}

Posted: Tue Nov 21, 2006 5:57 am
by cyberman
dburniston wrote: I tried to find something in the forum and I've tried a few tab javascripts I could find from google, but they throw a lot of Smarty errors when I try to add them.
Have you mask the javascript with [literal][/literal] ?

Re: Tabs within {Content}

Posted: Tue Nov 21, 2006 9:52 pm
by swathes
Yeah, I found that out yesterday....  {literal} tags dont parse it as php, is that right?

Re: Tabs within {Content}

Posted: Tue Nov 21, 2006 10:58 pm
by cyberman
:)