Welcome! Anonymous

TomatoCMS 2.0.7.1 released

Information of released and next versions

New feature: Permalink management (core module)

Postby phuoc69 » Fri Jul 30, 2010 9:36 am

New feature: Permalink management (core module)

TomatoCMS supports beautiful, friendly URLs that are good for SEO.
But by default the URL has the format of /module/action/id/another_id which should be more descriptive.
Now, this dream are coming true because in 2.0.7.1, you can configure the URL for all front-end URLs easily.
It is easy to use if you have been using Wordpress.

Below is the screenshot that give you idea how it look like:

Image

For each page, you can use the default URL, one of pre-define URLs or customize by yourself.
In case you use the custom URL, you don't have to worry about wrong parameters because the tool suggests the valid parameter based on your input characters.

If you are developer and want to use this feature for your module

This tool is part of core module. It means that you can integrate your module to this easily.
All you have to do is configure your routes.

For example, if you want the system to allows the user to customize the URL of article details pages, here is what you have to do:

1) Open the route configuration file

2) Add the following lines to your routes:
(The sample code below are taken from /application/modules/news/config/news.ini)

- Enable permalink:
Code: Select all
routes.RouteName.permalink.enable = "true"


- Configure the parameters: define the parameter names, its type:
(The article Id is required)
Code: Select all
routes.RouteName.defaults.permalink.params.article_id.name = "article_id"
routes.RouteName.defaults.permalink.params.article_id.regex = "(\d+)"
routes.RouteName.defaults.permalink.params.article_id.reverse = "%d"
routes.RouteName.defaults.permalink.params.article_id.required = "true"


Code: Select all
routes.RouteName.defaults.permalink.params.slug.name = "slug"
routes.RouteName.defaults.permalink.params.slug.regex = "([\w-_]+)"
routes.RouteName.defaults.permalink.params.slug.reverse = "%s"
routes.RouteName.defaults.permalink.params.slug.required = "false"


- Define the default URL and pre-defines URL:

Code: Select all
routes.RouteName.defaults.permalink.default = "news/article/view/{category_id}/{article_id}"
routes.RouteName.defaults.permalink.predefined[] = "news/{article_id}-{slug}.html"
routes.RouteName.defaults.permalink.predefined[] = "news/{year}/{month}/{article_id}-{slug}.html"


You can look at the file /application/modules/news/config/routes/news.ini from SVN for full of configurations.

That's all.
It can not be easier than that, right?
Last edited by phuoc69 on Wed Aug 04, 2010 9:52 am, edited 1 time in total.
Image
Nguyen Huu Phuoc, TomatoCMS's Founder
Skype: phuoc.69
Gtalk: phuoc6982
Phone: (84) 123 213 8486
Twitter: http://twitter.com/phuoc69
phuoc69
 
Posts: 335
Joined: Thu Jan 07, 2010 3:49 am

Re: TomatoCMS 2.0.7.1 released

Postby Sunfeather » Thu Aug 05, 2010 6:22 pm

Looks good, some useful improvements. A great CMS for sure, but hope I can create register access for non-logged in users???
Nice work guys.
Thanks
Sunfeather
 
Posts: 7
Joined: Thu Aug 05, 2010 5:53 pm

Re: TomatoCMS 2.0.7.1 released

Postby HominusNocturna » Tue Aug 24, 2010 9:42 pm

Great CMS.
When 2.0.8 comes out? :mrgreen:
HominusNocturna
 
Posts: 6
Joined: Wed Aug 18, 2010 3:04 pm

Previous

Return to Release

Who is online

Users browsing this forum: No registered users and 1 guest