Page 1 of 1

Additional tabs with fixed content.

Posted: Thu Jan 08, 2009 6:20 pm
by norman
If you want all your descriptions to have additional tabs containing fixed content, e.g. delivery info, returns info, then the following will help.

Edit layout TabbedProductDescription (or TabbedProductTabs) and look for the line

Code: Select all

TBPRDSC;
Immediately below that put the code that you want to display in tabs as per the example below (HTML should be OK):

Code: Select all

$permtabs = <<<TBPRDSC
{DELIVERY}
Delivery info here
.
.
{RETURNS}
Returns info here
.
.
TBPRDSC;
Look for the line:

Code: Select all

	while ( preg_match('/&#123;(.*?)&#125;(.*)/s', $tabcode, $bits) )

Immediately above it add:

Code: Select all

	$permtabs = str_replace('{', '&#123;', $permtabs);
	$permtabs = str_replace('}', '&#125;', $permtabs);
	$tabcode .= $permtabs;	
You can add more tabs but make sure you leave the first and last lines of that block alone.

Optionally, you could also put the additional content into a Variable or Layout and use that instead of the embedded text. E.g.

Code: Select all

$permtabs = <<<TBPRDSC
<actinic:variable name="MyAdditionalTabs" />
TBPRDSC;

Re: Additional tabs with fixed content.

Posted: Wed Oct 06, 2010 10:06 am
by valves
I have added this to my layouts, but nothing shows up as fixed content, although the tabs I add normally work ok?
Do I need to add soemthing else?
I use fragments and select the tabbed layout.

Re: Additional tabs with fixed content.

Posted: Wed Oct 06, 2010 10:13 am
by norman
That ReadMe is for Product Descriptions. If you are using Fragments based on the simpler layouts you will have to make these changes to the layout TabbedFragmentText.

Re: Additional tabs with fixed content.

Posted: Wed Oct 06, 2010 3:54 pm
by valves
Excellent! thankyou.