|
Previous
·
Next
|
cioscott
|
Date: 8/12/2005 2:51 pm · Subject: Trouble with navigation template · Rating: 23
The sample menu structure below came from
http://www.plainblack.com/etcetera/navigation-quandry. I too have
a similar page layout, and I have been trying to construct a navigation
template which produces this nicely nested unordered list, but I have
not been able to do so. Could somebody share their template or
provide some hints at what constructs are required in the
template? I am running WG 6.6.3, and my navigation is configured as follows:
- Starting Point Type: Relative to root
-
Starting Point: /a/ (+1)
-
Relatives to include: Self, Pedigree
Here is the sample menu structure. (Sorry for the tags,
but I still seem to have difficulty in pasting html code into this WG
editor.)
<ul>
<li>Home</li>
<ul>
<li>About</li>
<ul>
<li>People</li>
<li>Technology</li>
<ul>
<li>PHP</li>
<li>Perl</li>
</ul>
</ul>
<li>Contact</li>
<ul>
<li>Email</li>
<li>Phone</li>
<li>Fax</li>
</ul>
<li>Products</li>
<li>Support</li>
<ul>
<li>Help Desk</li>
<li>Knowledge Base</li>
<li>My Account</li>
</ul>
</ul>
</ul>
--- (Edited on 7/19/2005 3:25 pm [GMT-0500] by cioscott) ---
|
| Back to Top |
Rate [ | ]
|
| |
pwrightson
|
Date: 8/12/2005 2:51 pm · Subject: Re: Trouble with navigation template · Rating: 8
I am coming into this thread late, but I had a short fix added
somewhere between 6.6.0 and 6.6.3 to allow the following Nav template <tmpl_if session.var.adminOn>
<tmpl_var config.button><br>
</tmpl_if>
<ul>
<tmpl_loop page_loop>
<tmpl_if page.depthDiffIs-1><ul></tmpl_if>
<tmpl_if page.depthDiffIs1></ul></tmpl_if>
<li><a <tmpl_if page.newWindow>target="_blank"</tmpl_if> href="<tmpl_var page.url>">
<tmpl_if page.isCurrent>
<span class="selectedMenuItem"><tmpl_var page.menuTitle></span>
<tmpl_else>
<tmpl_var page.menuTitle></tmpl_if></a></li>
</tmpl_loop>
</ul> Then I use CSS to "pretty it up". BTW, I actually use 6.2.11 patched with the fix, so I cannot tell you for sure that this will work; it should in theory! Paul
--- (Edited on 7/21/2005 10:26 am [GMT-0500] by pwrightson) ---
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 8/12/2005 2:51 pm · Subject: Re: Trouble with navigation template · Rating: 8
Won't there be cases where you need to back track 2 levels with </ul> tags?
The transition between 2a and 3 will have a depthDiff of 2, but only 1 ending</ul> tag will be generated.
--- (Edited on 7/21/2005 10:43 am [GMT-0500] by colink) ---
|
| Back to Top |
Rate [ | ]
|
| |
cioscott
|
Date: 8/12/2005 2:51 pm · Subject: Re: Trouble with navigation template · Rating: 2
Interesting... I made a modification to the template provided by
pwrightson, and I included the page.depthDiff along with the
page.menuTitle so that we may see what WG reports as the actual
depthDiff. Below is a copy of my results. Notice that the
numbers produce by page.depthDiff do not correspond to what is
evaluated by page.depthDiffIsN. More bugs I suspect...
Here is the template I used for testing...
<ul>
<tmpl_loop page_loop>
<tmpl_if page.depthDiffIs-1><ul></tmpl_if>
<tmpl_if page.depthDiffIs1></ul></tmpl_if>
<tmpl_if page.depthDiffIs2></ul></ul></tmpl_if>
<tmpl_if page.depthDiffIs3></ul></ul></ul></tmpl_if>
<li><a <tmpl_if page.newWindow>target="_blank"</tmpl_if> href="<tmpl_var page.url>">
<tmpl_if page.isCurrent>
<span
class="selectedMenuItem"><tmpl_var
page.depthDiff> <tmpl_var page.menuTitle></span>
<tmpl_else>
<tmpl_var
page.depthDiff> <tmpl_var
page.menuTitle></tmpl_if></a></li>
</tmpl_loop>
</ul>
And here is the output it produced...
* 0 Intranet
o -1 FAQ
o 0 How To
o 0 Test
+ -1 HR
+ 0 Product Data
# -1 TestHTML
+ 1 Product Entry Form
+ 0 Promotions
+ 0 Go To Ebay
--- (Edited on 7/21/2005 11:07 am [GMT-0500] by cioscott) ---
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 8/12/2005 2:51 pm · Subject: Re: Trouble with navigation template · Rating: -2
Could you please repost this with the depth variable,as well?
--- (Edited on 7/21/2005 11:20 am [GMT-0500] by colink) ---
|
| Back to Top |
Rate [ | ]
|
| |
|
|
Re: Goals by JT - Fri @ 12:31pm Re: Images in RSS-Syndicated asset by elnino - Fri @ 12:25pm Re: Images in RSS-Syndicated asset by ehab - Fri @ 11:52am Re: Images in RSS-Syndicated asset by elnino - Fri @ 11:47am
|