[
http://jira.magnolia.info/browse/MAGNOLIA-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gregory Joseph closed MAGNOLIA-2182.
------------------------------------
Resolution: Not an issue
Assignee: Gregory Joseph (was: Boris Kraft)
Please use either the [mailing
lists|http://documentation.magnolia.info/#Mailinglists] or the [support
channel|http://documentation.magnolia.info/support.html] if appropriate.
In the meantime, you might want to check the sources and realize that the
threadlocal context (MgnlContext) is initialized by ContextFilter, and that the
aggregationState is further filled in by subsequent filters, not by magic.
> Unable to get Magnolia context
> ------------------------------
>
> Key: MAGNOLIA-2182
> URL: http://jira.magnolia.info/browse/MAGNOLIA-2182
> Project: Magnolia
> Issue Type: Bug
> Affects Versions: 3.5.8
> Environment: Linux
> Reporter: aji
> Assignee: Gregory Joseph
>
> Hi All,
> Currently we are working on magnolia integration with spring based web
> application.We are trying to render templates developed using magnolia in our
> application. Both magnolia and our application are running on the same tomcat
> server. The issue we are facing is getting MgnlContext from our application.
> Is there any document which explains clearly about basic integration steps?
> I am using below code for getting the context. Please help me with this.
> if (MgnlContext.getInstance() == null) {
> MgnlContext.setInstance(new WebContextImpl());
> }
> Content pageContent = MgnlContext.getActivePage();
> Collection children = pageContent.getChildren();
> Iterator it = children.iterator();
> while(it.hasNext()) {
> Content child = (Content) it.next();
> %>
> <hr/>
> Handle: <%=child.getHandle()%> <br/>
> Name: <%=child.getName()%> <br/>
> Template: <%=child.getTemplate()%> <br/>
> UUDI: <%=child.getUUID()%> <br/>
> Title: <%=child.getTitle()%> <br/>
> Level: <%=child.getLevel()%> <br/>
> <%}%>
> Above code is from
> http://wiki.magnolia.info/display/WIKI/Access+content+through+the+API
> Thanks,
> Ajit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------