ImpressPages URL structure
ImpressPages CMS has SEO friendly URL structure by default. You don't need to configure anything. Default URL structure is: http://www.example.com/language/zone/page/sub-page/...
"language" part of URL
Usually language part of URL consists of two letters (eg. "en"). You can change your language URL to anything you like in administration panel tab Standard -> Languages.
If your website has only one language and you don't need it to be displayed in URL, you can strip it out.
Steps on how to remove language part from URL:
- login to administration panel
- go to Developer -> Modules config tab
- select "languages" on the left sidebar
- click yellow folder icon near record "Options" on the right
- click edit icon near the record "Multilingual site"
- uncheck the value field and press "Save".
"zone" part of URL
Zone part of URL defines the zone in which the page exists. Usually each menu is in separate zone. By default top menu is in zone called "top" and left menu is in zone called "left". That means that all pages in top menu will have URL prefix "top". You can change that to anything else but you can't remove it.
To change URL part of zone:
- open administration panel
- go to Standard -> SEO
- click edit icon on zone record that you like to change
- replace "url" value to anything you like (avoid special characters)
URL vars
All the rest part of URL is called URL vars and is accessible using following code:
<?php global $site; $site->getUrlVars(); ?>
This function returns an array of current page URL vars. Fore example, if current URL is
http://example.com/en/left/page/subpage/subsubpage/?var1=val1&var2=val2
$site->getUrlVars() will return an array
('page', 'subpage', 'subsubpage')
Get vars
Don't access get vars using $_GET array. Use following function instead:
<?php global $site; $site->getGetVars(); ?>
This abstraction layer present to allow to change URL structure of any plugin without changing controllers or models directly.
Write a comment
You must be logged in to comment.