Hi,
Try this:
Global name: get_desc1_and_desc2
my @in = split /\n\n/, $_[0];
my $desc1 = $in[0];
shift @in;
my $desc2 = join("\n\n", @in);
return { Description1 => $desc1, Description2 => $desc2 }
}
Call with:
<h2>Paragraph 1: </h2>
<pre><%Description1%></pre>
<%if Description2%>
<h2>Paragraph 2: </h2>
<pre><%Description2%></pre>
<%endif%>
Should work.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Try this:
Global name: get_desc1_and_desc2
Code:
sub { my @in = split /\n\n/, $_[0];
my $desc1 = $in[0];
shift @in;
my $desc2 = join("\n\n", @in);
return { Description1 => $desc1, Description2 => $desc2 }
}
Call with:
Code:
<%get_desc1_and_desc2($Description)%> <h2>Paragraph 1: </h2>
<pre><%Description1%></pre>
<%if Description2%>
<h2>Paragraph 2: </h2>
<pre><%Description2%></pre>
<%endif%>
Should work.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!