Changes to Pretty URLs in CMS Made Simple 1.10 +

For years, CMS Made Simple used a Pretty URL system that embedded module parameters such as the detail page number and template into the URL as numbers. The Apache mod_rewrite logic would convert the URL into a php parameter string that the modules could parse to get the details they needed to display the page correctly. This system worked well, but was never fully satisfactory to many SEO practitioners who wanted to-the-letter control of the URL for any content or module detail page. So in CMS Made Simple 1.10 the Dev Team completely rewrote the URL path registration system to please the SEO gurus. But this removed the ability to pass module parameters via the URL.

There are two ways to work around this. First, many modules allow you to specify a default summary and detail template to use. This will work for most applications.

However, for more complex sites where you need to pass parameters to the module Robert Campbell (Calguy1000) added a plugin to CGExtensions Module called {cge_module_hint}. This tag can be placed in the SMARTY Logic section of the content page where your module will be displayed and it passes parameters to the module for you.

For example, when using the CGBlog module with pretty URLs turned on you wish to display blog articles for a specific category on one page and would like to use a nonstandard detail template to display the individual articles on a different page. I.e: perhaps on your “Sports” page you are calling CGBlog like:

{CGBlog category=sports detailpage=sports_detail}.

However, using pretty URLs it is impossible to specify a detailtemplate on the links that will generate the detail views. The solution is to use the {cge_module_hint} tag on the sports_detail page to provide some hints as to how CGBlog should behave on that page.

When editing the sports_detail page on the options tab, in the text area entitled “Smarty data or logic that is specific to this page:” you could enter a tag such as:
{cge_module_hint module=CGBlog detailtemplate=sports}.

Now when a user clicks on a link from the CGBlog display on your “sports” page he will be directed to the sports_detail page, and the CGBlog detail template entitled “sports” will be used to display the article.

You can pass multiple parameters to one module with one {cge_module_hint} tag. You can also use the same tag on one page to pass parameters to more than one module, but each module must have a separate instance of the tag.

Looking for quality CMS Made Simple Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , | Posted under CMS Made Simple | RSS 2.0

Author Spotlight

Ken Griffith

Ken Griffith lives in Nairobi, Kenya and is a web developer for Cottage Networks. He uses CMS Made Simple as his preferred content management system for most web projects.

One Comment on Changes to Pretty URLs in CMS Made Simple 1.10 +

  1. Funkyhead says:

    Hello,
    Why it doesn’t work with module “News” ?
    Thanks for your help

Leave a Reply

Your email address will not be published. Required fields are marked *


8 × 5 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>