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 » Mon May 09, 2016 1:05 pm

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: 1223
Joined: Sat Feb 07, 2004 9:55 pm

Re: More than 10 character automatic tab creation

Post by norman » Mon May 09, 2016 1:31 pm

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 » Mon May 09, 2016 1:39 pm

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 » Thu Feb 15, 2018 11:49 am

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: 1223
Joined: Sat Feb 07, 2004 9:55 pm

Re: More than 10 character automatic tab creation

Post by norman » Thu Feb 15, 2018 2:03 pm

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 » Fri Feb 16, 2018 10:22 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest