I am using tabber but I am trying to get the "more info image tab" above the Tabber but have hit a brick wall.
Announcement
Collapse
No announcement yet.
Tabber
Collapse
X
-
Originally posted by leehack View PostIf you have a hit a brickwall and can see the code, i'd suggest we will hit a nuclear bunker without seeing it. You'll need to spend a little more time than that to get any useful help, as a bare minimum a URL or a copy of your product layout.
<actinic:block php="true">
// Tabbed Product Description V3.08
$anc = '<actinic:variable name="EncodedProductAnchor" encoding="perl" selectable="false" />';
$desc = <<<TBPRDSC
<actinic:variable name="ProductDescription" selectable="false" />
TBPRDSC;
if ( preg_match('/(.*?)({.+?}.*)/s', $desc, $bits) ) // is there at least one tab?
{
$panecount = 0;
$tabhtml = '';
$before = $bits[1];
$after = '';
$tabcode = $bits[2];
if ( preg_match('/(.*?){}(.*)/s', $tabcode, $bits) ) // optional {} signifies end of tabbed text
{
$tabcode = $bits[1];
$after = $bits[2];
}
echo $before;
echo '<actinic:variable name="TabPrefix" encoding="perl" selectable="false" /><div id="tabber_' . $anc . '" class="widget"><ul class="tabnav">';
while ( preg_match('/{(.*?)}(.*)/s', $tabcode, $bits) )
{
$tabname = $bits[1];
$tabtext = $bits[2];
$tabcode = '';
if ( preg_match('/(.*?)({.+}.*)/s', $tabtext, $bits) ) // more tabs?
{
$tabtext = $bits[1];
$tabcode = $bits[2];
}
// output current tab
echo '<li><a href="#tab_' . $anc . '_' . $panecount . '"><span>' . $tabname . '</span></a></li>';
$tabhtml .= '<div id="tab_' . $anc . '_' . $panecount . '" class="tabdiv"><table id="tabinner"><tr><td>' . $tabtext . '</td></tr></table></div>'; // save the contents of the tab for later
$panecount++;
}
echo "</ul>";
echo "$tabhtml</div>
"; // output all the tab text
echo '<actinic:variable name="TabSuffix" encoding="perl" selectable="false" />';
echo $after;
}
else
{
echo $desc; // no tabs, so output text unaltered
}
</actinic:block>
Comment
-
You don't need to touch that code, you'd only touch that if you wanted to 'change' tabber, you don't want to change it, you want to 'move' it. You need to go up a couple of levels into the product layout (use the up arrow) and look for the pink underlined selector links on page, it is the order and placement of those you need to move.
Comment
-
From the Tabber ReadMe:
You can add the tabbed layout into any existing Product Layout by replacing variable
<actinic:variable name="ProductDescription" />
with
<actinic:variable name="TabbedDescription" value="TabbedProductDescription" />Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
Comment
-
Originally posted by NormanRouxel View PostFrom the Tabber ReadMe:
So if you have an existing Product Layout you're happy with, change as above and it will now be Tabber enabled.
I will have a go at this. I think the issue is now not the fact movign tabber its spliting the descption text from the tabs. But I will have a play with the layout.
Comment
-
I think the issue is now not the fact movign tabber its spliting the descption text from the tabs.Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
Comment
Comment