Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Web Design, Templates, and Themes > Dropdown Menu

Dropdown Menu

User ministrycrm
Date 2/20/2008 2:53 pm
Views 803
Rating 3    Rate [
|
]
Previous · Next
User Message
ministrycrm

I am trying to build a css dropdown menu.

Getting close but no cigar.

here is my nav settings:

Relative to root
+2
self
siblings
decendents
+3

The folloing template is not working:
 <tmpl_if session.var.adminOn>
<tmpl_var controls>
</tmpl_if>

<div id="menu">
<ul id="nav" class="eight">
<li id="nav_home" class="first"><a href="/home">Home</a></li>

<tmpl_loop page_loop>
<tmpl_if page.isViewable>
<li><a <tmpl_if page.newWindow>target="_blank"</tmpl_if> href="<tmpl_var page.url>"><tmpl_var page.menuTitle></a>

<tmpl_if page.hasChild>
  <ul>
   <tmpl_loop page_loop>
<tmpl_if page.isChild>
      <li><a <tmpl_if page.newWindow>target="_blank"</tmpl_if>       href="<tmpl_var page.url>"><tmpl_var page.menuTitle></a>
      </li>
</tmpl_if>
    </tmpl_loop>
  </ul>
</tmpl_if>
</li>
</tmpl_if>
</tmpl_loop>
</ul>
</div>

the html output should be this:

<ul>
  <li>link
     <ul>
         <li>sublink</li>
     </ul>
  </li>
</ul>

 It seems as though the nested loop is not working.
Thanks

--- (Edited on 2/20/2008 2:53 pm [GMT-0600] by ministrycrm) ---



Back to Top
Rate [
|
]
 
 
lrobinson

You could maybe do something like this:

<ul>

  <tmpl_loop page_loop>
    <tmpl_if page.isViewable>
      <tmpl_if page.depthIs2>

        <li><tmpl_var page.menuTitle>

      <tmpl_else>
        <tmpl_if page.depthIs3>
          <ul>
            <li><tmpl_var page.menuTitle></li>
          </ul>

        <tmpl_if page.isRankedLast>
          </li>
        </tmpl_if>

        </tmpl_if>

      </tmpl_if>
    </tmpl_if>

  </tmpl_loop>
</ul>
 

 

I am trying to build a css dropdown menu.

Getting close but no cigar.

here is my nav settings:

Relative to root
+2
self
siblings
decendents
+3

The folloing template is not working:
 <tmpl_if session.var.adminOn>
<tmpl_var controls>
</tmpl_if>

<div id="menu">
<ul id="nav" class="eight">
<li id="nav_home" class="first"><a href="/home">Home</a></li>

<tmpl_loop page_loop>
<tmpl_if page.isViewable>
<li><a <tmpl_if page.newWindow>target="_blank"</tmpl_if> href="<tmpl_var page.url>"><tmpl_var page.menuTitle></a>

<tmpl_if page.hasChild>
  <ul>
   <tmpl_loop page_loop>
<tmpl_if page.isChild>
      <li><a <tmpl_if page.newWindow>target="_blank"</tmpl_if>       href="<tmpl_var page.url>"><tmpl_var page.menuTitle></a>
      </li>
</tmpl_if>
    </tmpl_loop>
  </ul>
</tmpl_if>
</li>
</tmpl_if>
</tmpl_loop>
</ul>
</div>

the html output should be this:

<ul>
  <li>link
     <ul>
         <li>sublink</li>
     </ul>
  </li>
</ul>

 It seems as though the nested loop is not working.
Thanks

--- (Edited on 2/20/2008 2:53 pm [GMT-0600] by ministrycrm) ---

--- (Edited on 2/28/2008 8:47 am [GMT-0600] by lrobinson) ---



Back to Top
Rate [
|
]
 
 
dionak

We had a similar need recently and ended up building and contributing a package for menus (drop and fly-out). You may find this package really helpful, especially in regards to the template.  

Here's the link:

http://www.plainblack.com/user_contributions/user_contributions/packages/drop-and-flyout-navigations

Diona 

----
Knowmad Technologies
http://www.knowmad.com

--- (Edited on 3/6/2008 9:45 am [GMT-0600] by dionak) ---



Back to Top
Rate [
|
]
 
 
rogier

Is this still an issue? If so: try this and please let me know if it works:

<tmpl_loop page_loop>

<tmpl_if __FIRST__>
<ul>
<li>[home link here]</li>
</tmpl_if>

<tmpl_loop page.depthDiff_loop>
</ul>
</li>
</tmpl_loop>

<li><a href="<tmpl_var page.url>"><tmpl_var page.menuTitle></a>

<tmpl_if page.hasViewableChildren>
<ul>
<tmpl_else>
</li>
</tmpl_if>

<tmpl_if __LAST__>
<tmpl_loop page.indent_loop>
</ul>
</li>
</tmpl_loop>
</ul>
</tmpl_if>

</tmpl_loop>

 

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 13-05-2008 12:22 am [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 

Re: Pagination and Navigation Menus. by colink - Thu @ 04:05pm

Re: Corrupt Asset Tree by mwille64 - Thu @ 02:12pm

Pagination and Navigation Menus. by eleger81 - Thu @ 11:52am

Re: Corrupt Asset Tree by preaction - Thu @ 11:44am

Corrupt Asset Tree by mwille64 - Thu @ 11:18am

Smoketest For nightly_2008-07-24 by Visitor - Thu @ 01:39am

Re: Hello! by crythias - Wed @ 01:13pm

Testing status, July 23, 2008 by colink - Wed @ 10:53am

Re: Paragarph issue in link lists by bernd - Wed @ 09:11am

Re: Dutch translation 7.5.17 done by Klaus - Wed @ 04:28am

Re: Hello! by Klaus - Wed @ 04:23am

Smoketest For nightly_2008-07-23 by Visitor - Wed @ 01:38am

Hello! by crythias - Tue @ 09:07pm

Re: Duplicate web site by techwriter - Tue @ 10:47am

Dutch translation 7.5.17 done by bartjol - Tue @ 09:13am