Re: Page vs Content Actions & setting page title in actions
Anthony Eden <[email protected]> Thu, 27 Feb 2003 14:13:30 -0500
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
Andy Zeneski wrote: > I am trying to figure out some differences, and if anyone can help me > understand I would appreciate it. > > Page actions vs. Content actions > > It appears page actions only run on the requested page. > Content actions run on all content. > > So, if page A has one page action (a1) and one content action (a2) > and, page B has one page action (a3) and one content action (a4) > > Page B is included in page A, (and using the extended filesystem repo) > Page A is requested: > > Actions a1, a2, a4 will be run. Probably in that order? That is correct. > Why are page actions defined <page-action></page-action> and content actions > are defined as <content-action name=""/> it appears that the format is > required, but I could be wrong. The action formats are: <page-action name=""></page-action> <content-action name=""></content-action> You can nest any XML inside of the action declaration and that XML will be passed to the action as a Configuration object, which is essentially a tree of configuration data. The format: <page-action></page-action> Is an old version which should no longer be used and was only their for compatibility with an older version of JPublish. I am going to remove it completely for 2.0 since you brought it up. :-) > Lastly, > > I am attempting to call Page.setTitle() from inside either a page or content > action, but nothing seems to happen, how can I set the page name from an > action? The get/set Title methods are old and are deprecated. I can remove them from JPublish 2.0 if no one objects. Instead you should set a named property. Keep in mind that case-sensitivity may matter, so a property "title" is different than "Title". Sincerely, Anthony Eden ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf