Thanks for the response Giancarlo, and the suggestions.

I really like the idea of adding a separate Config node to store project related constants - I could even see storing the css file and template related images in that fashion.

I would still like to access some properties from the page's template, however. Two main reason why: I would like to keep the page properties as 'simple' as possible so that a user can pick a template and not have to worry about config options for the page - just start adding paragraphs (within reason of course). Second, I would like to add some parameters for just that template that I can change via the admin console and all of the pages based on that template would update.

I looked at the Template API, but this doesn't seem to provide a way to find out which Template is in use for the current page - there must be a property of the page that reveals its template, but I can't seem to find the property name anywhere. Any suggestions on where to look?

Thanks again,

Eric Everman


On Sep 26, 2005, at 8:10 PM, Giancarlo F. Berner wrote:

Hi Eric

You can access Template Information bei using the class "info.magnolia.cms.beans.config.Template". Check the API Doc for more information.

But I am wondering why you want to add the property "show-left- column" to the template. Wouldn't it make more sense to keep this value individual for every webpage? Either create a Dialog and add that property there, or then add that property to the "page properties" dialog. Another possibility is to create a configuration setup in the "Config" repository, where you can create properties to fine tune your web application. For example you could create a node within Config like "myProject/internet" and "myProject/intranet" and below each node add the same property "show-left-column". This way you could use the same template for the intranet and internet and adapt the behavior according to these config parameters.

cheers
/giancarlo

Eric Everman wrote:


Hi-

I'm likely missing something really obvious, but....

How do I access template properties from the page? For instance, I have a modules/templating/Templates/some-template with a node- data entry of "show-left-column" = "true". How do I access that in a page that is using the template?

Thanks in advance,

Eric Everman


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------




----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to