mason-users

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Mason] Extreme Newbie: how to use the value of title method in an if statement Jérôme Etévé Tue May 05 11:00:35 2009

Hi,
  to do that, you need to have the output of your method as a string.
So you need the method scomp which you can use like that:

% my $title = $m->scomp('SELF:title') ;
% if ( $title eq $menu_item ) { etc...

(use 'eq' to compare strings. Reserve == for numbers).

Cheers,

Jerome

2009/5/5 Sara Gil <[EMAIL PROTECTED]>:
> Hi,
>
> I'd like to use the value of "title" (defined in <%method
> title>Home</%method>) in an if statement, something like:
>
> if (title == $menu_item)...
>
> and after reading docs and googling and trying several things, I
> always run into some error. Any advice (docs to read, hints, answers
> :) ...?
>
> Thanks.
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Mason-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/mason-users
>



-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

[EMAIL PROTECTED]

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Mason-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mason-users