Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Matthias70] Combination of two globals?

Quote Reply
Re: [Matthias70] Combination of two globals? In reply to
In Reply To:
Do I need the 300 in the global an in the template as well?
my $chars = $_[2] || '300';
<%description_short( $ID, $Description, 300,1)%>

Yes, because $_[0] is the first parameter $_[1] the second and so on.

If the 300 in your template is missing, $chars will become 1.

The 300 in your global is the default, when you call it with <%description_short( $ID, $Description)%>.

Regards

Merten
Subject Author Views Date
Thread Combination of two globals? Matthias70 5309 Nov 4, 2007, 7:41 AM
Thread Re: [Matthias70] Combination of two globals?
neves 5216 Nov 5, 2007, 12:25 AM
Thread Re: [neves] Combination of two globals?
Matthias70 5224 Nov 5, 2007, 7:46 AM
Thread Re: [Matthias70] Combination of two globals?
neves 5223 Nov 5, 2007, 7:52 AM
Thread Re: [neves] Combination of two globals?
Matthias70 5196 Nov 5, 2007, 8:26 AM
Thread Re: [Matthias70] Combination of two globals?
neves 5197 Nov 5, 2007, 9:36 AM
Thread Re: [neves] Combination of two globals?
Matthias70 5183 Nov 5, 2007, 10:05 AM
Thread Re: [Matthias70] Combination of two globals?
neves 5181 Nov 5, 2007, 10:33 AM
Thread Re: [neves] Combination of two globals?
Matthias70 5174 Nov 5, 2007, 10:43 AM
Post Re: [Matthias70] Combination of two globals?
neves 5181 Nov 5, 2007, 11:29 AM