along these lines, here's a quick and dirty method that i used to do something similar. not elegant, but functional.
<%init> my $banner_top = $m->scomp( '/layout/ads/get_ad', position=> 'banner_top' ); my $is_sonar_ad = $banner_top =~ /adforce Javascript/ ? 1 : 0; </%init> ... % if ( $is_sonar_ad ) { <& /layout/ads/sonar_reposition_js &> % } </body> </html> did i mention that it was ugly? Timothy S. Nelson wrote: > On Thu, 5 Apr 2007, William Cox wrote: > >> Tim, >> that certainly is one way to do it but it wont work for what i need. >> the header component called from the request_comp needs to do some >> stuff based on components to be called later. things like bringing in >> js scripts and css files if certain components need them. heres an >> outline: >> >> index.html >> |-header.cmp >> |-compa.cmp >> |-compd.cmp >> >> header.cmp needs to look ahead at what components are about to be >> called so it can include the appropriate css and js files. for now, >> dont need to worry about anything more than components called just >> from index.html, i can ignore comps called from compa.cmp, compd,cmp, >> etc. > > IIRC, you said that if you could do it from a footer, you'd be able to > do it. What I'm suggesting is: > > 1. Run the stuff that produces the body, but don't output it to the > browser > 2. Save that somewhere (ie. in a variable) > 3. Run the header (which can use that variable to determine stuff) > 4. Output the body part > > I'm not 100% sure you grasped what I had in mind, so I'm reiterating > it in different words :). > > > --------------------------------------------------------------------- > | Name: Tim Nelson | Because the Creator is, | > | E-mail: [EMAIL PROTECTED] | I am | > --------------------------------------------------------------------- > > ----BEGIN GEEK CODE BLOCK---- > Version 3.12 > GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- > PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- > -----END GEEK CODE BLOCK----- > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users