Hi.
Thankyou for these answers.
What I dont' understand is:
- I declare a container named 'tria' for home.jsp;
- I declare another container named 'tria' for my products.jsp.
Tha's what happens if I include the same globals.inc for each template declaring here the container;
- I am in product.jsp and I start to add fields to the tria container.
From what I understand they should only be visible as long as I use product.jsp, as their creation is local to the page; it should not be possible to retrieve their values using a path like the following:
currentSite.homePage.containerLists[\"materialContainer\"].getContainerByID("+materialContainer.getID()+").fields[\"materialValue
- Instead, i can retrieve field values I inserted starting from home.jsp
If a container declaration is local to a template, how can its content be reachable from another page ?
The declaration is local to a template, meaning that you cannot use the same declaration twice on the same template. BUT Jahia does have accessors for container lists that are on other pages. These are called Absolute Adressed Container List (aka AbsoluteContainerLists).
Basically you can retrieve a container list from another page through :
jData.containers().getAbsoluteContainerList(containerListName, pageID);
Another equivalent way is to do :
currentSite.getPage(pageID).containerLists[containerListName] in an _expression_.
I hope this helps you understand. But you are starting with one of the most complicated templates that we EVER did in Jahia, so I'm not sure how good a starting point that is.
Regards,
Serge Huber.
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
