Modify the {sitemap}-Plugin

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Alex_Leipzig

Modify the {sitemap}-Plugin

Post by Alex_Leipzig »

Hi there,

I want to apply some modifications to the sitemap plug-in, but don't know how to do it.
  • is there a way to use css?
  • how can i change what the plug-in shows? (i'd want "menu text" only)
Thanx
WiseQ

Re: Modify the {sitemap}-Plugin

Post by WiseQ »

You can do this by modifying the file /plugins/function.sitemap.php

Regards
WiseQ
Alex_Leipzig

Re: Modify the {sitemap}-Plugin

Post by Alex_Leipzig »

WiseQ wrote:You can do this by modifying the file /plugins/function.sitemap.php
Eh, could you be more precise? What do I have to change if I only want the display the menu text of the items?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Modify the {sitemap}-Plugin

Post by Ted »

Remove the:

Code: Select all

			if ($onecontent->Name() != '')
			{
				$menu .= ' - ' . $onecontent->Name();
			}
Alex_Leipzig

Re: Modify the {sitemap}-Plugin

Post by Alex_Leipzig »

That works great - thanx for helping me PHP idiot.
Alex_Leipzig

Different list-style-types in {sitemap}

Post by Alex_Leipzig »

I would like to have "upper-roman" for the parent elements (sections) and "decimal" for the child elements in the sitemap plugin. How would I have to do that?
ljbadenz

Re: Modify the {sitemap}-Plugin

Post by ljbadenz »

alex wrote: I would like to have "upper-roman" for the parent elements (sections) and "decimal" for the child elements in the sitemap plugin. How would I have to do that?
Here stick this CSS into your template's stylesheet (If you don't want it messing the other pages, just create a new template for the sitemap page):

Code: Select all

ul { list-style-type: upper-roman; }
ul ul { list-style-type: decimal; }
Alex_Leipzig

Re: Modify the {sitemap}-Plugin

Post by Alex_Leipzig »

Thanks a lot for the tip - my problem was that I was confused with the various ul's in the code. Now it should work!
ljbadenz

Re: Modify the {sitemap}-Plugin

Post by ljbadenz »

You might also want to add:

Code: Select all

ul h2 { font-size: 10pt; font-weight: bold; }
ul ul h2 { font-weight: normal; }
To fix up the ugly h2's
iNSiPiD

Re: Modify the {sitemap}-Plugin

Post by iNSiPiD »

I'd prefer if the element was simply removed from the next revision. There's just no need need for it.

I make this change every time I upgrade (cos I keep forgetting which files I've modified ;)).

Perhaps the inclusion of an ID for the could be added for custom CSS.
Last edited by iNSiPiD on Mon Jul 25, 2005 6:01 am, edited 1 time in total.
sagarkale

Re: Modify the {sitemap}-Plugin

Post by sagarkale »

How to get rid of the items which are not shown in the menu (Show in menu unchcked)?
sagarkale

Re: Modify the {sitemap}-Plugin

Post by sagarkale »

sagarkale wrote: How to get rid of the items which are not shown in the menu (Show in menu unchcked)?
I found it, just add

Code: Select all

 || !$onecontent->ShowInMenu()
in

Code: Select all

if (!$onecontent->Active() )
Last edited by sagarkale on Tue Jul 26, 2005 6:12 am, edited 1 time in total.
iNSiPiD

Re: Modify the {sitemap}-Plugin

Post by iNSiPiD »

Oh yeah. That would be a great option to build in as well.

Not  alot of point me hiding pages if people can then display them all using the site map.

I suppose you could always create them ata deep level and then use number_of_levels to keep them from appearing.

Little tweaks like this really help make the CMS more complete. Such teency weency widdle things...

Can you hear me, Marcus? ;)
Last edited by iNSiPiD on Tue Jul 26, 2005 11:54 pm, edited 1 time in total.
ljbadenz

Re: Modify the {sitemap}-Plugin

Post by ljbadenz »

I don't know, I only have my 403, 404 and 500 error pages hidden. But I like them in my sitemap so people can know where they are when one of these pages appear.

To stop Google indexing them I use a robots.txt file. ( it a good idea to hide /admin/ in robots.txt so as not to make it easy for people to do this http://www.google.co.nz/search?sourceid ... n+Login%22)

Easy isn't ? That's how a lot of hacker find 'secret' admin pages that they can try to hack!!!

Maybe whishy should put an example robots.txt file, or may be even use the robots tag to block the admin pages by default.

See http://www.robotstxt.org/wc/exclusion.html for details.
iNSiPiD

Re: Modify the {sitemap}-Plugin

Post by iNSiPiD »

That's a great idea. A lot of non-techies (erm...me, for example) just don't know this stuff.

A URL rewrite script that could turn:

index.php?page=main

into

/main/

would be great too! :)
Locked

Return to “Modules/Add-Ons”