You could write
<& header, title=>$m->scomp('SELF:title') &>
but it would be easier to just do this in the header comp:
<HTML>
<HEAD>
<TITLE><& REQUEST:title &></TITLE>
</HEAD>
Off-topic: A less PHP-ish style would be to move the header and footer
components into the autohandler, but there are valid reasons to do it that
way too.
~ John Williams
On Wed, 6 Sep 2006, Tod Hagan wrote:
> Hello list,
>
> I'm a brand new HTML::Mason user with an autohandler that looks like:
>
> <HTML>
> <HEAD>
> <TITLE><& SELF:title &></TITLE>
> <& header &>
> <% $m->call_next %>
> <& footer &>
>
> I'd like to put the first three lines of HTML into my header component
> along with the rest of the HTML and pass the title in as an argument,
> but I can't figure out how to pass the result of SELF:title. I've tried
> things like
>
> <& header, title=>SELF:title &>
> <& header, title=>'SELF:title' &>
>
> to no avail. The first generates an error, while the second passes the
> string 'SELF:title'.
>
> How can I add the value of SELF:title into the argument list I'm passing
> to my header component?
>
> Thanks in advance.
>
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users