Tabber. Making a default tab if none already defined.

Tabbed Product and Fragment Descriptions.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Tabber. Making a default tab if none already defined.

Post by norman »

If you want a single tab applied to all layouts that you haven't entered any

{Info}Description...

type entries then do this.

Edit layout TabbedProductDescription

look for the line

Code: Select all

TBPRDSC;
immediately after that line add the following

Code: Select all

if ( ! preg_match('/(.*?)({.+?}.*$)/', $desc) )	// if no tabs?
	{
	$desc = '{Details}' . $desc;  // add one in
	}
And, of course, replace layout ProductDescription with TabbedProductDescription in all your Product lLayouts.
Norman
Post Reply