Hi,

I have multiple component roots (two) for my sites.  One is a site-specific
root and one is a "fallback" root that provides default components if the
site-specific root hasn't "overridden" them.

For example, /footer.mas (in the fallback comp root) and /footer.mas (in the
site-specific comp root).

This works great if (a) the site doesn't have its own footer.mas defined
(Mason uses the fallback one instead), and (b) the site has its own
footer.mas that REPLACES the fallback footer (Mason uses the site-specific
one and the fallback is never called).

However, I also want to support scenario (c) where the site has its own
footer.mas that SUPPLEMENTS the fallback one.  For example, I have some
site-specific stuff that I want to include (using the site's footer.mas) in
addition to the fallback's footer.mas.

To avoid circular references, then, I need a way to call the fallback's
footer.mas from within the site-specific footer.mas.  Wondering if there's a
clean way to do this.  Something like:

page.html:
---
<& /header.mas &>
... content ...
<& /footer.mas &>
---

footer.mas:
---
... site-specific stuff ...
<& /footer.mas &>    (here is where I want to say "use the fallback's
footer.mas")
---


Right now I'm working around case (c) by moving the site-specific
footer.masto another folder:

page.html:
---
<& /header.mas &>
... content ...
<& /site/footer.mas &>  (different path entirely to avoid the circular ref)

(with the site-specific footer.mas the same as above).

But, I'd rather not have to change my dozens of include paths if/when I
decide to "override" one of the fallback components.

(Note I'm just using header/footer includes as an example... I have lots of
generic components that I occassionally want to override or augment using
the above technique.)

Thanks!
-------------------------------------------------------------------------
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

Reply via email to