Tabber V2 - Displaying Actinic content in the first tab.

Tabbed Product and Fragment Descriptions.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Tabber V2 - Displaying Actinic content in the first tab.

Post by norman »

It is possible to tweak Tabber to automatically create a first tab containing other bits of the Product Layout. The tab will only be created if there's some content in it.

In the example below we'll move the Components and Attributes to the first tab.

1) Go to Design / Library / Layouts / TabbedDescription; right-click TabbedProductDescription and select Copy.

2) Rename that copy to be TabbedProductDescription Customised.

3) Edit TabbedProductDescription Customised and look for the line

Code: Select all

		echo '<ul id="ul_' . $anc . '">';
4) Below that line append

Code: Select all

	$firsttab = <<<ENDOFCODE
<actinic:variable name="AttributeList" />
<actinic:variable name="ComponentList" />	
ENDOFCODE;
	if ((strlen($firsttab)) > 10 ) $tabcode = '&#123;CHOICES&#125;' . $firsttab . $tabcode;	// only add tab if there's some content
5) OK out.

6) Go to Design / Library / Layouts / Products; right-click Standard Layout Using CSS - Tabbed Descriptions and select Copy.

7) Rename that copy to be Standard Layout Using CSS - Tabbed Descriptions Customised.

8) Edit Standard Layout Using CSS - Tabbed Descriptions Customised and look for the line

Code: Select all

         <actinic:variable name="TabbedDescription" value="TabbedProductDescription" />
9) replace that line with

Code: Select all

         <actinic:variable name="TabbedDescription" value="TabbedProductDescription Customised" />
10) Finally, in product layout Standard Layout Using CSS - Tabbed Descriptions Customised look for the lines

Code: Select all

         <actinic:variable name="AttributeList" />
         <actinic:variable name="ComponentList" />
and delete them.

Now if you use layout Standard Layout Using CSS - Tabbed Descriptions Customised for a product and use some Tabber tabs you'll find an extra first tab CHOICES containing the Actinic Components and Attributes.

It is easy to add additional tabs for other elements. Just repeat steps 3 and 4 (amending the word CHOICES and replacing the two Actinic Variables. Don't change anything else.
Also do step 10 to remove these Variables from their usual place in the product layout.
Post Reply