Forum OpenACS Development: A couple of questions

Collapse
Posted by Richard Hamilton on
I wondered if someone could help me with these two questions.

1) What are #'s used for in templates (i.e. reference to variable <span>#<span>acs-subsite.welcome_user#), how do these differ from @variable@ references.

2) If I have a set of nested templates (say for example four layers deep such as when serving etp pages) and I want to pass a variable back to the master template to determine how the master template behaves, is there a way to pass the variable all the way up to the master in one declaration to avoid having to add the &lt;property name="variable">@variable@&lt;/property> construct to every .adp slave template?

Thanks Richard

Collapse
2: Re: A couple of questions (response to 1)
Posted by Brian Fenton on
Hi Richard,
the #'s used in adps are for internationalisation. So <span>#</span>acs-subsite.welcome_user# will display the welcome_user message key in the current locale. If you go to acs-lang/admin in your site you can see all these message keys.

Brian

Collapse
3: Re: A couple of questions (response to 2)
Posted by Richard Hamilton on
Thanks Brian, much appreciated.

I see that the Your Account link only has one little 'o' against it whilst the other items have two. Do you have any idea why this is?

Collapse
4: Re: A couple of questions (response to 3)
Posted by Brian Fenton on
Each 'o' is a link to edit a message key, so I guess you must have a few message keys. Click on them and see what happens!
Collapse
5: Re: A couple of questions (response to 2)
Posted by Richard Hamilton on
On the DevAdmin button the link on the left links to 'Developer's Administration' which is 'acs-subsite.Developers_Admin' whilst the link on the right links to 'DevAdmin' which is 'acs-subsite.DevAdmin'.

I am not clear what these are and what the difference is between them.

Also, on my Admin button I have a link on the left to the message for 'Site-wide administration' - 'acs-subsite.Site_wide_administration' and on the the right to 'Admin' - 'acs-subsite.Admin'.

I am also not clear why the one link has these translator toggles to two different destination links.

R.

Collapse
6: Re: A couple of questions (response to 1)
Posted by Dave Bauer on
Richard,

I think on the buttons there is one message key for the button text and one for the title attribute of the link that appears when you hover over the button.