[opencms-dev] ${cms.enableReload} erases elements

Tobias Karrer kartobi at gmail.com
Tue Mar 7 11:51:13 CET 2017


Hi Clement,

which component did you drag to your template?

The navigation your included did varnish after reload as well?

Best,
Tobias


Am 06.03.2017 um 03:27 schrieb Clement Wee:
> Dear OpenCMS Admin,
>
> I created a custom module that contains javascript. Following advice 
> from a recent post on this mailing list, I included the 
> ${cms.enableReload} command so that the script result refreshes on 
> every edit.
>
> However, now when I drag the component over my template, the whole 
> page refreshes and then the component disappears along with any other 
> component added prior to adding that component.
>
> My template is a custom template with navigation.
>
> Here is the template in entirety:-
>
> <%@page buffer="none" session="false" trimDirectiveWhitespaces="true" %>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <html>
> <head>
> <cms:headincludes type="css" />
> <cms:headincludes type="javascript" />
> <cms:enable-ade />
> </head>
> <body>
> <cms:include 
> file="%(link.weak:/system/modules/com.elixirtech.opencms/elements/main-nav.jsp:169a79fe-ff14-11e6-ba85-a75a6890411c)"/>
> <cms:container name="elx-main-content" type="element" width="500" 
> maxElements="8" detailview="true"/>
> </body>
> </html>
>
> The include is:-
>
> <%@page taglibs="c,cms" %>
> <c:set var="navStartLevel">1</c:set>
> <cms:navigation type="treeForFolder" startLevel="${navStartLevel}" 
> endLevel="4" var="nav"/>
> <ul class="nav-side list-group sidebar-nav-v1">
> <c:forEach items="${nav.items}" var="elem">
> <li class='nav-side-level-${elem.navTreeLevel - navStartLevel}
>           list-group-item
>           ${!elem.navigationLevel && 
> nav.isActive[elem.resourceName]?"active":""}'>
> <a href="<cms:link>${elem.resourceName}</cms:link>">${elem.navText}</a>
> </li>
> </c:forEach>
> </ul>
>
> as gotten directly from the tutorial.
>
> Could someone please explain why the vanishing act occurs?
>
>
> Regards,
> Clement
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170307/ef031ffd/attachment.htm>


More information about the opencms-dev mailing list