Problem with duplicate navigation and cms_selflink ...[solved]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

Problem with duplicate navigation and cms_selflink ...[solved]

Post by davids355 »

I have a big issue with my website:
http://www.shareworld.co.uk
cmsmadesimple core 1.6.1

I have a navigation issue that has been made worse by converting to pretty urls, but that I realise was still a problem before:

Alot of my links in cms are writen in the following way:
bla bla
(this is because I dont use the wisywig).

And some links are written like this:
{cms_selflink page='64' text='Something even safer than houses?'}

The later I take it automatically updates to accomodate the pretty urls, however, the first method I used does not update, which means that when I generate a sitemap, it picks up two of every page:
index.php?page=some-page
index.php/some-page.html

and so on.

To make matters worse, most of my links dont have a trailing backslash (/index.php?...) so as pages go deeper, I am getting even more duplicates, ie:

index.php?page=some-page
articles/index.php?page=some-page
forum/thread/02/index.php?page=some-page
etc

In short, when I ran a sitemap generation script (xml sitemap generator) it indexed 7500 pages! Even though I only have about 1500 pages or less.

The issue with the trailing backslash is not a problem because i can add that in, but what I really want to do is convert all my manual links to cms_selflinks (so they automatically update when neccesary).

My question is, how do I find out each pages number:
{cms_selflink page='64' text='Something even safer than houses?'}

And is there a way I can list all these out/export them, so I can then go through all my pages and change the manual links to cms_selflinks??
Last edited by davids355 on Sat Aug 01, 2009 6:47 pm, edited 1 time in total.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Problem with duplicate navigation and cms_selflink please read!

Post by Jeff »

You don't need to know the page id, you put the page alias as well (preferred for readability) so instead of this  bla bla you would have {cms_selflink page='so-and-so' text='bla bla'}
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

Re: Problem with duplicate navigation and cms_selflink please read!

Post by davids355 »

Ah thanks! Will get started on that then! By the way, thanks again for work done:)
Post Reply

Return to “CMSMS Core”