Hi,

this is not a question but a solution about rendertags.

The customer had pages with an opt_PageHidden to hide the page within the 
navigation.
Even with CurrentIndex.HasChildren() we could get the case, that subitems 
exist but all of them are hidden.
In this case, the UL nad nextlevel should not be created because the 
submenu would be empty.

THis is how it works:
 
<reddot:cms>
   <if>
      <query 
valuea="Context:CurrentPage.Elements.GetElement(opt_PageHidden).Value" 
operator="!=" valueb="hidden">  
         <htmltext>
            <li>
                <a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><%!! 
Escape:HtmlEncode(Context:CurrentIndex.Headline) !!%></a>
         </htmltext>
         <if>
            <query valuea="Context:CurrentIndex.HasChildren()" 
operator="==" valueb="Bool:True">
               <!-- Only when subpages exist -->
               
               <!-- Create a variable -->
               <output type="object" 
object="Store:Set(boolVisibleSubPages,Bool:False)" />
                 
               <!-- Loop over the subpages -->                     
               <foreach itemname="subnavList" 
object="Context:CurrentPage.Elements.GetElement(lst_navigationMain).Value" 
countername="listCounter">

               <if>
                  <query 
valuea="Store:subnavList[Int32:listCounter].Elements.GetElement(opt_PageHidden).Value"
 
operator="!=" valueb="hidden">
                     <!-- Only when a visible subindex is found -->
 
                     <!-- Set the variable to true -->
                     <output type="object" 
object="Store:Set(boolVisibleSubPages,Bool:True)" />
                  </query>
               </if>
               </foreach>
               <if>
                  <query valuea="Store:boolVisibleSubPages" operator="==" 
valueb="Bool:True">
                     <!-- Only when a visible subindex was found -->
                     <htmltext>
                         <ul>
                            <navigation:nextlevel>
                         </ul>
                     </htmltext>
                  </query>
               </if>
            </query>
         </if>
         <htmltext>
            </li>
         </htmltext>
     </query>
  </if>
</reddot:cms>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to