That was the way I originally did it, but when Paul saw it he advised me to do it as a toplist because when you use < ! -- BEGIN CATSBODY -- > if you view the code it puts <!-- BEGIN REGULAR --> between every line, which is not good code!
Ok, but you're already using it that way on the main part of the page. Why does having that code in a nav menu differ than having it anywhere else on the site? Unless, of course, you're planning on replacing that as well.
In any case, maybe you can try the static file generation option in the admin panel. You can have it create a static file which contains ONLY your nav menu and then include it via php (or maybe even by using [INSERTFILE=navmenu] or something like that) into your templates.
Any category changes won't show up instantly, but it apparently updates every 12 hours. If you can wait 12 hours for any changes to come across maybe this can work for you.
babrees wrote: That was the way I originally did it, but when Paul saw it he advised me to do it as a toplist because when you use if you view the code it puts between every line, which is not good code!
Whatever I said, that wasn't it because it doesn't make any sense. The default template is perfectly good code, that's why I use it.
The only limitation is it's for the main index, won't work in the wrapper.
hai wrote: Any category changes won't show up instantly, but it apparently updates every 12 hours. If you can wait 12 hours for any changes to come across maybe this can work for you.
Huh? Maybe if you're generating a static html copy and using that.
I'm now starting to upgrade a site to v.5 series. The menu currently is the site map shown within the wrapper using this code...
<!-- BEGIN MAP LINE --> <!-- BEGIN REGULAR --><IF {CATPARENT} is 0><ul class="menu"> <li ><a href="{CATURL}" class="menu" title="{CATNAME}">{CATNAME}</a></l i></ul>
<OTHERWISE> <ul class="submenu">
<li > <a href="{CATURL}" class="menu" title="{CATNAME}">{CATNAME}</a></l i> </ul> </IF> <!-- END REGULAR --> <!-- END MAP LINE -->
Comments on Better way to do menu nav
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I'm trying to see if there is a better (or different) way to do a navigation menu of the main categories.
At the moment I do them as a toplist, but think this slows the site down, as I want other toplists on the main page.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Just curious, but why DO you use a toplist? Can't you use the code from the main page?
Or is it that this code doesn't work in the wrapper or something?
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
That was the way I originally did it, but when Paul saw it he advised me to do it as a toplist because when you use < ! -- BEGIN CATSBODY -- > if you view the code it puts <!-- BEGIN REGULAR --> between every line, which is not good code!
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Ok, but you're already using it that way on the main part of the page. Why does having that code in a nav menu differ than having it anywhere else on the site? Unless, of course, you're planning on replacing that as well.
In any case, maybe you can try the static file generation option in the admin panel. You can have it create a static file which contains ONLY your nav menu and then include it via php (or maybe even by using [INSERTFILE=navmenu] or something like that) into your templates.
Any category changes won't show up instantly, but it apparently updates every 12 hours. If you can wait 12 hours for any changes to come across maybe this can work for you.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
That was the way I originally did it, but when Paul saw it he advised me to do it as a toplist because when you use if you view the code it puts between every line, which is not good code!
Whatever I said, that wasn't it because it doesn't make any sense. The default template is perfectly good code, that's why I use it.
The only limitation is it's for the main index, won't work in the wrapper.
Any category changes won't show up instantly, but it apparently updates every 12 hours. If you can wait 12 hours for any changes to come across maybe this can work for you.
Huh? Maybe if you're generating a static html copy and using that.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Huh? Maybe if you're generating a static html copy and using that.
Yes, the static file generation is exactly what I was referring to.
The only limitation is it's for the main index, won't work in the wrapper.
Good to know. I didn't realize that. Just curious, but is the wrapper the only template it would not work in?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Sorry, I missed half your post on speed-reading it.
It's for the main index, so it only works in the main index.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I'm now starting to upgrade a site to v.5 series. The menu currently is the site map shown within the wrapper using this code...
<!-- BEGIN MAP LINE -->
<!-- BEGIN REGULAR --><IF {CATPARENT} is 0><ul class="menu">
<li ><a href="{CATURL}" class="menu" title="{CATNAME}">{CATNAME}</a></l i></ul>
<OTHERWISE>
<ul class="submenu">
<li > <a href="{CATURL}" class="menu" title="{CATNAME}">{CATNAME}</a></l i>
</ul>
</IF>
<!-- END REGULAR -->
<!-- END MAP LINE -->
Site: http://www.thecanaandog.co.uk/
I have used this because I require subcategories to show and a toplist can not display it as I wish.
However, I can't get it working in v.5.0.12 - has it changed so I can no longer us it in the wrapper?
If so is there anyway I can produce a menu to display like this?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
That should work. Will test when I get a chance.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Fixed.