Page 1 of 1

Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Thu May 18, 2006 8:43 pm
by cwaz13
Hi, I was just wondering if it's possible to display the pages in the sitemap by Title instead of Menu Text.  For example, right now my sitemap looks like:

- about
- contact
- what_we_do


and I'd like it to show the page titles:

- About Our Company
- Contact Us
- What We Do


I was looking through function.sitemap.php but my attempts to change anything keep breaking the page.  I also thought the "add_elements" parameter might do it, but either that's not it, or I'm just not understanding how to use it correctly.

Any help would be great.  Thanks!

Re: Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Mon May 22, 2006 2:29 pm
by cwaz13
bump!

Re: Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Mon May 22, 2006 2:40 pm
by Ted
If you're using the sitemap tag, it's a simple code change.

Open up plugins/function.sitemap.php.  Look for

Code: Select all

$menu .= ">".$onecontent->MenuText()."</a>";
Change it to:

Code: Select all

$menu .= ">".$onecontent->Name()."</a>";
Not a pleasant solution, but it should work.

Ted

Re: Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Mon May 22, 2006 2:50 pm
by Russ
cwaz13,  for accessibility and other reasons, a site map should be a list of actual menus where appropriate. It helps re-inforce navigation and structure. I'm not sure why you are putting:

- about
- contact
- what_we_do

in your menu? Surely

- About Us
- Contact Us
- What We Do

would be better and solve your problem?

However, I've not really checked the code but seem to remember somewhere around line 160

$menu .= ">".$onecontent->MenuText()."";

could perhaps be changed to:

$menu .= ">".$onecontent->Name()."";

Hope this helps,
Russ

Re: Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Mon May 22, 2006 4:07 pm
by cwaz13
Hmm... maybe I misinterpreted how some of this works.

When I edit or create a content page, I have "Title" and "Menu Text".  I have the Title set to, for example, "Job Opportunities".  I set the Menu Text to "jobs" as that's what I thought set the URL to that page.... i.e. domain.com/index.php?page=jobs.

How is the URL like that determined?  It appeared to me that it was auto-filled (under the Options tab) from the Menu Text that I used.   But maybe I missed something.  ???

Also, for this site, I have my own Flash menu already created -- with my own Menu Text, of course -- so I'm not using any of the dynamically-rendered CMS ones.  I have gone into my Flash menu and manually set the links to things like index.php?page=jobs, from what I set as the Menu Text (and what I thought was the auto-determined "Page Alias").

Thanks both for the temp fix, but apparently I was doing this incorrectly anyway? :)

Re: Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Mon May 22, 2006 4:31 pm
by Russ
'Page Alias:' is where the menu is taken from if it is set, it is on the next tab when editing (Options), so maybe you missed it :)

As for using Flash menus, comments about accessibility and useability spring to mind. It seems a bit strange to me to use such a menu with CMS when it has such a good and flexible menu system?

Hope this helps, just my thoughts

Russ

Re: Sitemap -- Show "Title" instead of "Menu Text"?

Posted: Mon May 22, 2006 5:02 pm
by cwaz13
Ok, so I need to set three things?  Title (Page Title) and Menu Text (for CMS submenus and Sitemap) -- both probably the same? -- and then the page alias (used for URL).  Is the page alias always an auto-generated abbreviation of the title or menu text?

And for Flash menus, the reason I was using them here was for appearance, rollovers, animation, etc.  I've taken part in the debate between graphics/Flash and plain markup/CSS plenty of times over the past couple years, and no one ever seems to completely win it.  :)  I do my best to gauge the target audience and use simplicity when needed, for accessibility reasons, but as an artist, I tend to lean toward spicing things up with Flash when the site and/or audience allows.

In most cases, I'd be open to using a CSS dropdown menu if I could at least use images as the main buttons and rollovers.... but from what I saw, I thought CMS was pretty set to use all-text menus, which do not fit my design at all.  :-\  If I'm wrong please correct me!  I'd love to have some dynamically-generated CMS menus, as long as I could format them with graphics I create as part of my design.