Webmastersite.net
Register Log In

Better way to do menu nav

Comments on Better way to do menu nav

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 24, 2008 - 12:11 AM:

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.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 24, 2008 - 6:22 AM:

Just curious, but why DO you use a toplist? Can't you use the code from the main page?


< ! -- BEGIN CATSBODY -- >
< ! -- BEGIN REGULAR -- >
html
< ! -- END REGULAR -- >
< ! -- END CATSBODY -- >


Or is it that this code doesn't work in the wrapper or something?
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 24, 2008 - 7:07 AM:

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!
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 24, 2008 - 8:06 AM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 25, 2008 - 1:24 PM:

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.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 25, 2008 - 2:35 PM:

Paul wrote:
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.

Paul wrote:
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?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 25, 2008 - 4:58 PM:

Sorry, I missed half your post on speed-reading it.

It's for the main index, so it only works in the main index.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 11, 2008 - 4:45 AM:

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 >&nbsp;&nbsp;&nbsp;<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?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 12, 2008 - 8:29 PM:

That should work. Will test when I get a chance.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Oct 13, 2008 - 11:15 AM:

Fixed.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.