Page 1 of 1

More than 10 character automatic tab creation

Posted: Mon May 09, 2016 1:05 pm
by leej
Hi Norman,
I can see that the Tabber has been rewritten for V16 compared to earlier version of the tabber. Once thing I wanted to ask was the fix you helped applied in earlier version whereby if the product description was longer than 10 characters then a 'Description' Tab would automatically be generated. Is this still possible using the Tabbed Product Prefix layout? I've tried applied the original code that I had but it didn't seem to trigger anything.

Regards.
Lee.

Re: More than 10 character automatic tab creation

Posted: Mon May 09, 2016 1:31 pm
by norman
You would do this differently in SD 2016 and using the new Tabber.

Edit your Product Layout(s) and look for:

Code: Select all

<actinic:variable name="ProductDescription" />
Immediately before it add:

Code: Select all

<actinic:block if="%3cactinic%3avariable%20name%3d%22ProductDescriptionLength%22%20%2f%3e%20%3e%2010">{Description}</actinic:block>

Re: More than 10 character automatic tab creation

Posted: Mon May 09, 2016 1:39 pm
by leej
Hi Norman,
Many thanks. That did the trick.
Regards.
Lee.

Re: More than 10 character automatic tab creation

Posted: Thu Feb 15, 2018 11:49 am
by leej
Hi Norman,
Quick question. Can a similar thing be done for Fragment text as well? I can't seem to find any fragment text description length equivalent.

Re: More than 10 character automatic tab creation

Posted: Thu Feb 15, 2018 2:03 pm
by norman
In layout Tabbed Fragment Text, replace:

Code: Select all

<div class="tabbertext" data-tabid="<actinic:variable name="FragmentAnchor" />"><actinic:variable name="FragmentText" /></div>
With:

Code: Select all

<div class="tabbertext" data-tabid="<actinic:variable name="FragmentAnchor" />"><actinic:block if="strlen%28%27%3cactinic%3avariable%20name%3d%22FragmentText%22%20%2f%3e%27%29%20%3e%2010" >{Description}</actinic:block><actinic:variable name="FragmentText" /></div>

Re: More than 10 character automatic tab creation

Posted: Fri Feb 16, 2018 10:22 am
by leej
Hi Norman,
Thank you for your help. This worked like a charm.