On Thursday, November 14, 2002, at 11:01 AM, drowsy@mac.com wrote:
> Joao Pedro,
>
>> The biggest drawback in this: I had to hack Bric::Util::Burner::Mason
>> to
>> include
>> the DESTINATION_DIR in the comp_root.
>
> I hope to contribute more to this thread, but could you show us what
> edits you made to the Mason Burner?
Personally, I think it's a bad idea to include the destination
directory as part of the component root in the burner. Formatting
content in templates should be completely independent of displaying
content via the resulting files.
> Also, please tell us how flexible the non-article content has to be.
>
> I'm wondering why cascading authohandlers up the category path would
> not suffice.
I agree with this. I see three other solutions to this problem that
require no more hacking and are much simpler:
1) As Michael says, use cascading autohandlers. If you're using the
1.5.0 code base from CVS HEAD, these are known as "category templates"
(and is what HTML::Template calls them, in any event).
2) Manage the non-article content as independent server-side includes.
You can keep them in Bricolage as media assets, and link them in in
templates using your preferred include syntax. I'm doing this for
Macworld.com, where all the navigation, advertising, and banner stuff
is put into each page at delivery time via server-side includes. This
is very efficient, both because SSIs are fast and because to change any
element of the nav, you only need to change the SSI media asset and
republish it, rather than all of the stories that contain it.
3) And finally, if you're using the 1.5.0 code from CVS HEAD, you can
use "utility templates." These are just arbitrary templates that you
can include in your code at burn time (via $m->comp in Mason templates,
or <TMPL_INCLUDE> tags in HTML::Template). Put all of your non-article
stuff in utility templates, and pull them into your article templates
when articles are burned. You can also do this with the 1.4.x code now,
but you have to create elements for the utility templates.
HTH,
David
--
David Wheeler AIM: dwTheory
david@wheeler.net ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: Theory@jabber.org
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general
> Joao Pedro,
>
>> The biggest drawback in this: I had to hack Bric::Util::Burner::Mason
>> to
>> include
>> the DESTINATION_DIR in the comp_root.
>
> I hope to contribute more to this thread, but could you show us what
> edits you made to the Mason Burner?
Personally, I think it's a bad idea to include the destination
directory as part of the component root in the burner. Formatting
content in templates should be completely independent of displaying
content via the resulting files.
> Also, please tell us how flexible the non-article content has to be.
>
> I'm wondering why cascading authohandlers up the category path would
> not suffice.
I agree with this. I see three other solutions to this problem that
require no more hacking and are much simpler:
1) As Michael says, use cascading autohandlers. If you're using the
1.5.0 code base from CVS HEAD, these are known as "category templates"
(and is what HTML::Template calls them, in any event).
2) Manage the non-article content as independent server-side includes.
You can keep them in Bricolage as media assets, and link them in in
templates using your preferred include syntax. I'm doing this for
Macworld.com, where all the navigation, advertising, and banner stuff
is put into each page at delivery time via server-side includes. This
is very efficient, both because SSIs are fast and because to change any
element of the nav, you only need to change the SSI media asset and
republish it, rather than all of the stories that contain it.
3) And finally, if you're using the 1.5.0 code from CVS HEAD, you can
use "utility templates." These are just arbitrary templates that you
can include in your code at burn time (via $m->comp in Mason templates,
or <TMPL_INCLUDE> tags in HTML::Template). Put all of your non-article
stuff in utility templates, and pull them into your article templates
when articles are burned. You can also do this with the 1.4.x code now,
but you have to create elements for the utility templates.
HTH,
David
--
David Wheeler AIM: dwTheory
david@wheeler.net ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: Theory@jabber.org
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general