How can I create TABS for node content

John Bryan - August 8, 2008 - 17:46

To avoid re-inventing the wheel... am I missing something?

I have had a look at the info for "Magic Tabs" and "Javascript Tools:Tabs" (aka "JQuery UI Tabs") etc. and can't see anything that simple converts node content into tabs e.g. by splitting at each <H1>title</H1>.

The content of the nodes will either be populated by imported data or by dumb-users so it needs to be an automated process of splitting pages. Is there such a user transparent tab creating module out there?

Note: I am restricted to Drupal 5.x modules due to other modules in use.

i use

WorldFallz - August 8, 2008 - 18:11

i use http://drupal.org/project/quicktabs and it works great.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Cool

aitala - August 8, 2008 - 19:58

That is a very useful module. Thanks for the info!

__________

Eric Aitala - f1m@f1m.com
The Formula 1 Modeling Website
www.f1m.com

welcome ;-) === "Give a man

WorldFallz - August 8, 2008 - 20:44

welcome ;-)

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Can't see how this would apply?

John Bryan - August 8, 2008 - 23:28

First of all thanks for responding 8¬)

From a quick install and look I can't see how to automatically split a node's content into tabs using this? You have to define the tabs before-hand and define different block/view sources to populate them from instead of sections of content from a single node. I am looking to create tabs based on the content of a single node where the number of, and titles of, the tabs are defined by the actual content e.g.:-

Node "Body" content

<h1>INTRODUCTION</h1>
<p>This is a slightly sick version of a well known nursery rhyme.</p>
<h1>TEXT</h1>
<p>Mary had a little lamb,<br/>
she ate it with mint sauce.<br/>
She couldn't find another lamb,<br/>
so then she ate the horse.<br/></p>
<h1>CONCLUSION</h1>
<p>A sad and pathetic attempt at humour that should be buried and forgotten.</p>

Rendered tabulation

INTRODUCTION | Text | Conclusion
              -------------------------------------------------------------
This is a slightly sick version of a well known nursery rhyme.

I.e. Similar to how other modules build page content indexes but creating tabs instead of a bullet list based on heading titles (or some other seperator in the content).
Regards

John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31

Starting to get somewhere

John Bryan - August 9, 2008 - 00:55

I am starting to get somewhere with JQuery Tabs.

Will post an update when I have the mechanism fleshed out a bit.

Regards

John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31

Comming soon - Tabs-Auto module

John Bryan - August 13, 2008 - 01:13

I am hoping to release an alpha of "Tabs Auto" module in the next view days.

This is an 'input filter' based partly on the TableOfContents module that when active creates a tab for each H1 header in the node document. i.e. the aim is that to use this will require no configuration, no customising of node templates and no entering of custom tags or classes within the node content - just use normal headings in the node and the tabs will be created.

Once I have wrapped my head around Drupal's CVS setup and got a working module then I will add options to define what HTML tag to split the nodes at e.g. <H2> instead of <H1> or a custom tag such as XML tag in pasted data.

Regards

John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31

 
 

Drupal is a registered trademark of Dries Buytaert.