Page 1 of 1

Tabber. Making a default tab if none already defined.

Posted: Thu Jun 28, 2007 4:28 pm
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.