More than 10 character automatic tab creation

Post Reply
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

More than 10 character automatic tab creation

Post 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.
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: More than 10 character automatic tab creation

Post 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>
Norman
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

Re: More than 10 character automatic tab creation

Post by leej »

Hi Norman,
Many thanks. That did the trick.
Regards.
Lee.
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

Re: More than 10 character automatic tab creation

Post 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.
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: More than 10 character automatic tab creation

Post 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>
Norman
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

Re: More than 10 character automatic tab creation

Post by leej »

Hi Norman,
Thank you for your help. This worked like a charm.
Post Reply