Additional tabs with fixed content.
Posted: Thu Jan 08, 2009 6:20 pm
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
Immediately below that put the code that you want to display in tabs as per the example below (HTML should be OK):
Look for the line:
Immediately above it add:
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.
Edit layout TabbedProductDescription (or TabbedProductTabs) and look for the line
Code: Select all
TBPRDSC;
Code: Select all
$permtabs = <<<TBPRDSC
{DELIVERY}
Delivery info here
.
.
{RETURNS}
Returns info here
.
.
TBPRDSC;
Code: Select all
while ( preg_match('/{(.*?)}(.*)/s', $tabcode, $bits) )
Code: Select all
$permtabs = str_replace('{', '{', $permtabs);
$permtabs = str_replace('}', '}', $permtabs);
$tabcode .= $permtabs;
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;