Alternatively you can pass arguments from autohandler or any other component in the component call like

 

<& /shared/header.mhtml, title => $m->scomp('SELF:title') &>

And use $title in header.mhtml to set header.

 

Regards,

 

Vimal

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rodney Rindels
Sent: Monday, April 10, 2006 3:50 PM
To: Max Clark
Cc: [email protected]
Subject: Re: [Mason] New User Question

 

 

On 4/10/06, Max Clark <[EMAIL PROTECTED]> wrote:

>Rodney,

>The <%method title> and <& SELF:title &> works great as long as I have
>the title code in the autohander directly. How do I move the header to
>a shared component and pass the title method to the shared component?

>i.e. <& /shared/header.mhtml &>
>
>Thanks,


 

 

Max
I dont have much experience with that but you should be able to call it with

    my $comp = $m->fetch_comp($m->caller());
    $comp->call_method('title');

Not sure if caller is what you would need ... but some way to get at the requested component.


Rod

 

Reply via email to