HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


How to edit what is seen on the site map?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#44871 (In Topic #9910)
Avatar

Community saint

Does anyone know how to edit what is seen when the site map is opened? There are links that I do not want anyone to access directly.
Back to the top
 
Posted
Rating:
#44872
Avatar

Hi,

There's no direct way to edit the site-map. You can set permissions which has the side-effect of remove links, but if you want more fine control you'll need to create your own site-map manually.

This is fairly easy to do if you cheat. View the site-map as a guest, view the HTML source and copy the portion corresponding to the site map. Paste edited versions of this into the site-map/404 pages (i.e. whereever required) between HTML tags.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#44873
Avatar

Community saint

Thanks, Chris. I removed the link to the site map, but I did not want to remove all the info provided.

Could I use the match key page restrictions to limit access from the site map, or would that deny evey one access to the pages from every link?
Back to the top
 
Posted
Rating:
#44889
Avatar

Sorry, I'm afraid that's not going to work.

You could edit the code actually. Copy sources/blocks/main_sitemap.php to sources_custom/blocks/main_sitemap.php and make some edits. If you look at lines 94 and 95:

Code

               if ($page=='404') continue;
               if ($page=='sitemap') continue;
you can pretty much extend exactly that pattern to defin additional exceptions. ("continue" in this case means "skip", which I guess is kind of counter-intuitive but blame the creators of the C programming language where the syntax came from :lol:).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#44903
Avatar

Community saint

Thank you, again, Chris. I will play around with that and the site-map/404 pages and see which works best for me. I think I will try the cheat with the site-map/404 pages first.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: