Tags and permalinks

13 posts by 2 authors in: Forums > CMS Builder
Last Post: April 2, 2015   (RSS)

By Jesus - April 2, 2015

One more thing Greg,

Do you think its possible to adjust the URL with permalinks to have a search friendly URL?

Example, currently I've this url:

http://mydomain.com/viajes/tags.php?tags_keyword=Cancun

How about something like this:

http://mydomain.com/viajes/hoteles-Cancun/

I currently have 4 categories on this section (Hoteles, Circuitos de Viaje, Circuitos, Destinos Turísticos). I already adjusted the permalinks plugin in order to display the category on the proper URL. So my current articles are displayed like this:

http://mydomain.com/viajes/hoteles/ for Hoteles

http://mydomain.com/viajes/circuitos-de-viaje/ for Circuitos de Viaje

http://mydomain.com/viajes/cruceros/ for Cruceros

and http://mydomain.com/viajes/destinos-turisticos/ for Destinos Turisticos

Of course we know on each article the current category where it belongs.

So, now with the tag idea, I'm wondering if I can properly set a SEF URL based on what I currently have on my permalinks. I understand this its not a common task and it will be ok if it can't be done, but based on the previous experience working with CMSBuilder and the powerful of the script, this might become an useful solution for some others as well.

Thanks in adavnce for your help!

Jesus

PS
This might be more like a modrewrite thing, but I'm not sure if it can be done with the current permalinks plugin.

By gregThomas - April 2, 2015

Hi Jesus, 

The permalink system only allows you to link to files or records in CMSB, so it wouldn't be possible to link to the tag field and retrieve on that.

My knowledge on htaccess rewrite rules is fairly basic, so I'm not sure how you could create that system, but it should be possible. Perhaps you could create a permalink for the tags page in the permalinks section so that tags.php has the URL /tag/ (You can find out how to do this in the permalinks readme file). Then your URL's could look something like this:

http://mydomain.com/tag/?tags_keyword=Cancun

You could also change the tags_keyword variable so that it's just keyword, which would give you the URL:

http://mydomain.com/tags/?keyword=Cancun

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com