[SOLVED] remove section header's alias from pretty URL

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

[SOLVED] remove section header's alias from pretty URL

Post by frankmanl »

My menu is built like this:

Code: Select all

section header A
  page A1
  page A2
  section header Aa
    page Aa1
    page Aa2
  page A3
section header B
  page B1
  page B2
etc.
The pretty URL of page Aa1 looks like:
mydomain.com/sectionheaderA/sectionheaderAa/pageAa1
Is there a way to remove the sectionheaders from the URL so it will be:
mydomain.com/pageAa1

Frank
Last edited by frankmanl on Thu May 08, 2014 3:13 am, edited 3 times in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: remove section header's alias from pretty URL

Post by velden »

Site Admin -> Global Settings -> Content Editing Settings

* Automatically create page URL's
* Automatically created URL's are flat

I think you need to create the urls for existing pages yourself.
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: remove section header's alias from pretty URL

Post by frankmanl »

Exactly what I need. Thank you.
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: remove section header's alias from pretty URL

Post by frankmanl »

Things went wrong after doing this.
Website concerned: http://www.ongerepte-natuur.nl/

strange internal link behaviour
I use TinyMCE. Internal links are changed from {cms_selflink href='page-alias' } to http://www.domain.nl/{cms_selflink href='page-alias' } - I have not seen this before.
On the home page the link shown (first paragraph, text "in bepaalde natuurgebieden weer haar eigen gang gaan") is http://www.ongerepte-natuur.nl/http://w ... s-gebieden.
It works well, but looks weird and is not what I want.
Is this normal behaviour when using these flat URLs?

some internal links stopped working
Same page, last paragraph "aansprekende diersoorten" links to http://www.ongerepte-natuur.nl/http://w ... landdieren but generates a 404 error.
"de Noordzee" links to http://www.ongerepte-natuur.nl/http://w ... l/noordzee and works well.
Both pages can be found in the menu:
• WILDE DIEREN > Ter land
and
• WILDERNIS > Noordzee
where they both exist and work.

After applying Veldens suggestion I cleared the cache.

Sytem info


----------------------------------------------

Cms Version: 1.11.10

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.4
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.14.2
Printing: 1.1.2
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
Album: 0.9.3
FormBuilder: 0.5.3
CMSPrinting: 1.0.5
MicroTiny: 1.2.6
CGExtensions: 1.38.8
UsersGuide: 1.8.1
CGSimpleSmarty: 1.7.2


Config Information:

php_memory_limit:
process_whole_template: 1
max_upload_size: 50000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: false


Php Information:

phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 50M
session_save_path: /tmp (0777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 4.1.21
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found


----------------------------------------------
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: remove section header's alias from pretty URL

Post by velden »

On the same page where 'Clear cache' button is, there is a 'Update Routes' button.

It might help. Regarding TinyMCE I'm not sure.
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: remove section header's alias from pretty URL

Post by frankmanl »

Update routes made no difference.
It turned out to be an option in TinyMCE: Advanced > Generate relative urls was somehow unchecked.
Checking it again solved both problems.

this post put me on the right track:
http://forum.cmsmadesimple.org/viewtopi ... =7&t=69902
Post Reply

Return to “The Lounge”