Re: LHS navigation menu. How to pass the contents of the portlet to child pages?

Bojana Lalic <[email protected]> Tue, 22 Jul 2008 09:55:10 +0930
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Can someone please help me with my query below? :)

Regards

Bojana

From: Bojana Lalic
Sent: Monday, 21 July 2008 4:12 PM
To: '[email protected]'
Subject: LHS navigation menu. How to pass the contents of the portlet to child pages?
Importance: High

Hi all

I've got a left hand navigation on my site which consists of the open content area (can be any portlet) and navigation links. The links work fine and are "passed" through to the pages navigated to from the menu. However, if I for example add a free text portlet with some text in it, it does not get passed through to the pages navigated to from the menu. (Even though the links do).

I've included the contents of my box.jsp file below... I've debugged and it gets to the <content:container id="boxContainer"> and it then stops. Does anyone have any tips as to how to get this to work, and make sure that my portlet contents is passed through?

Thanks

Bojana


<%@ page language="java" %>
  <%@ include file="declarations.jsp"%>
  <%@ include file="box_declarations.jsp"%>
  <%
      int loopcount=0;
      String dualColumn = "";
      if (request.getParameter("dualColumn")!=null) {
            dualColumn = request.getParameter("dualColumn");
      }
      //String priorityTitle = (request.getParameter("title")==null)?"":request.getParameter("title");
      //System.out.println(priorityTitle);

    //Output Priority title if it exists
    //if (request.getParameter("title")!=null) {
      //out.print("<h3>"+request.getParameter("title")+"</h3>");
    //}
%>
  <content:containerList name='<%="boxContainer" + id%>' id="boxContainerList"> <jahiaHtml:actionMenu name="boxContainerList" namePostFix="Portlet" resourceBundle="jahiatemplates.Corporate_portal_templates"> <logic:greaterThan name="boxContainerList" property="size" value="0">
  <%
            if (loopcount==0 && request.getParameter("title")!=null && jData.gui().isNormalMode()) {
                  out.print("<h3>"+request.getParameter("title")+"</h3>");
            }
      %>
</logic:greaterThan> <content:container id="boxContainer">
    <%
    ContainerBean boxContainerBean = (ContainerBean) pageContext.findAttribute("boxContainer");
    JahiaContainer theContainer = boxContainerBean.getJahiaContainer();
    if (theContainer.getField("boxType" + id) != null) {
        %>
    <content:updateContainerURL id="updateContainerURL" display="false"/> <content:deleteContainerURL id="deleteContainerURL" display="false"/> <bean:define id="boxTypeValue"          name="boxContainer" property='<%="field(boxType" + id + ").value"%>'/> <content:textField name='<%="boxTitle" + id%>' diffActive="true" display="false" valueId="boxTitle" defaultValue=""/> <bean:define id="displayBox" value="true"/> <logic:empty name="boxTitle"> <jahia:ifNotEditMode> <bean:define id="displayBox" value="true"/> </jahia:ifNotEditMode> <jahia:ifEditMode> <bean:define id="displayBox" value="true"/> </jahia:ifEditMode> </logic:empty> <logic:equal name="displayBox" value="true">
    <!-- dual column code -->
    <%
                  if (dualColumn.equals("true")) {
                        loopcount = loopcount+1;
                        if (loopcount % 2 != 0) {
                        %>
        <%
                        ;} else {
                        %>

          <%
                        ;}
                  }
                  %>
          <!-- dual column code end -->

           <logic:present name="boxContainer" property='<%="field(boxHeadingLevel" + id + ")"%>'>
           <bean:define id="headingSize" name="boxContainer" property='<%="field(boxHeadingLevel" + id + ")" %>'/>
           </logic:present>

                  <jahia:ifEditMode></jahia:ifEditMode>
                  <jahia:ifEditMode>
                        <logic:empty name="boxTitle">
                              <h3 class="box_notitle">No Title</h3>
                        </logic:empty>
                  </jahia:ifEditMode>
                  <logic:notEmpty name="boxTitle">

                                          <logic:present name="headingSize">
                                          <logic:equal name="headingSize" property="value" value="Heading 1"><h1></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 2"><h2></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 2 - Home"><h2 class="intro_heading"></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 3"><h3></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 4"><h4></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 5"><h5></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 6"><h6></logic:equal>
                                    </logic:present>

                        <bean:write name="boxTitle" filter="false"/>
                                    <logic:present name="headingSize">
                                          <logic:equal name="headingSize" property="value" value="Heading 1"></h1></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 2"></h2></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 2 - Home"></h2></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 3"></h3></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 4"></h4></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 5"></h5></logic:equal>
                                          <logic:equal name="headingSize" property="value" value="Heading 6"></h6></logic:equal>
                                    </logic:present>

                  </logic:notEmpty>






<jahia:ifEditMode>


</jahia:ifEditMode>
<span class="align"><jahiaHtml:actionMenu name="boxContainer" namePostFix="" resourceBundle="jahiatemplates.Corporate_portal_templates" useFieldSet="false"> </jahiaHtml:actionMenu></span> <bean:define id="freeText" value='<%=ResourceBundleMarker.drawMarker(resBundleID,"freeText","")%>'/> <bean:define id="files"    value='<%=ResourceBundleMarker.drawMarker(resBundleID,"files","")%>'/> <bean:define id="links"    value='<%=ResourceBundleMarker.drawMarker(resBundleID,"links","")%>'/> <bean:define id="forms"    value='<%=ResourceBundleMarker.drawMarker(resBundleID,"forms","")%>'/> <bean:define id="events"    value='<%=ResourceBundleMarker.drawMarker(resBundleID,"events","")%>'/> <bean:define id="sendToColleague"    value='<%=ResourceBundleMarker.drawMarker(resBundleID,"sendToColleague","")%>'/> <bean:define id="news"    value='<%=ResourceBundleMarker.drawMarker(resBundleID,"news","")%>'/> <bean:define id="generic" value='<%=ResourceBundleMarker.drawMarker(resBundleID, "generic","")%>'/><c:choose> <c:when test="${boxTypeValue == files}">
          <%@ include file="box_files.jsp"%>
          </c:when> <c:when test="${boxTypeValue == links}">
          <%@ include file="box_links.jsp"%>
          </c:when> <c:when test="${boxTypeValue == forms}">
          <%@ include file="box_forms.jsp"%>
          </c:when><c:when test="${boxTypeValue == news}">
          <%@ include file="box_rss.jsp"%>
          </c:when> <c:when test="${boxTypeValue == generic}">
          <%@ include file="box_generic_feed.jsp"%>
          </c:when> <c:otherwise>
          <%@ include file="box_text.jsp"%>
          </c:otherwise> </c:choose> </logic:equal>
          <%
    }

    %>
          <logic:present name="boxContainer" property='<%="field(boxTopOfPage" + id + ")"%>'> <bean:define id="top_of_page" name="boxContainer" property='<%="field(boxTopOfPage" + id + ")" %>'/> </logic:present> <logic:present name="top_of_page"><logic:equal name="top_of_page" property="value" value="true">
          <div class="topOfPage"><a href="#Top_of_Page">Top of Page</a></div>
          </logic:equal></logic:present>
          <!-- dual column code -->
          <%
            if (dualColumn.equals("true")) {
                  if (loopcount % 2 == 0)
                  {%>
      <% ;}
                  else
                  {%>

    <% ;}
            }
      %>
    <!-- dual column code end -->
    </content:container> <logic:greaterThan name="boxContainerList" property="size" value="0">
  </logic:greaterThan> <content:addContainerURL id="addContainerURL" display="false"/> <logic:present name="addContainerURL"> <br/>
  <a
            href="<bean:write name='addContainerURL'/>"><%=addBoxButton%>&#160;<jahia:resourceBundle
            resourceBundle="jahiatemplates.Corporate_portal_templates"
            resourceName="addPortlet"/></a> </logic:present> </jahiaHtml:actionMenu> </content:containerList>
  <%
if (jData.gui().isEditMode()) {
    %>
  <img src="<jahia:contextURL/>/images/pix.gif" alt="" width="147" height="12"/>
  <%
}
%>


________________________________
Mind Over Matter - How Technology Matters
Find out how modern lifestyles and technologies are influencing the human mind at education.au's seminar on Tuesday 26 August, Sydney.
Find out more: www.educationau.edu.au


IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of education.au limited except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email.

_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list