Lightbox Images in a bespoke tab.
Posted: Mon Oct 13, 2014 9:19 pm
Scenario: You want to have Drillpine's Lightbox images show in an IMAGES tab. The tab will only show if some Lightbox images are defined.
Edit layout TabbedProductDescription and look for the line:
Immediately after it, on a new line, add:
Note: Do not indent this code (other than above). The line TBLBOXICONS; must be against the left margin.
The IMAGES tab will only show (as last or only tab) if a some Lightbox images are defined.
You will also need to turn off the usual display of the Lightbox images.
If using Lightbox V4, there is a setting, LightboxProductIconsPosition that you can set to None.
If using Lightbox V3 or earlier, you will have to switch to a product layout that doesn't contain Lightbox Image List (or edit that layout out of your existing product layout).
Tested on SD 2013 with Lightbox V4.0.8 and jQuery Tabber V4.09.
Edit layout TabbedProductDescription and look for the line:
Code: Select all
TBPRDSC;
Code: Select all
$lboxicons= <<<TBLBOXICONS
<actinic:variable name="Lightbox" value="Lightbox Image List" />
TBLBOXICONS;
if ( strlen(trim($lboxicons)) )
{
if ( preg_match('/(.*?){}(.*)/s', $desc, $bits) ) // optional {} signifies end of tabbed text
{
$desc = $bits[1] . '{IMAGES}' . $lboxicons. '{}' . $bits[2];
}
else
{
$desc = $desc . '{IMAGES}' . $lboxicons;
}
}
The IMAGES tab will only show (as last or only tab) if a some Lightbox images are defined.
You will also need to turn off the usual display of the Lightbox images.
If using Lightbox V4, there is a setting, LightboxProductIconsPosition that you can set to None.
If using Lightbox V3 or earlier, you will have to switch to a product layout that doesn't contain Lightbox Image List (or edit that layout out of your existing product layout).
Tested on SD 2013 with Lightbox V4.0.8 and jQuery Tabber V4.09.