Jump to content
n13design

Change or remove "content" from cms url in Prestashop 1.6

Recommended Posts

I want to remove or change the word content in the cms URL.  I can't find the word content anywhere in the link.php file.  How is this word generated?  I've looked at the other posts and they all seem to concern earlier versions of Prestashop not 1.6.  I don't want to use the htcaccess to rewrite this.  I'd like to know how prestashop writes that word and just change it.

 

 

Share this post


Link to post
Share on other sites

Great, I found it.  Now how can I create two CMS routes?  I had hoped I could edit a file and maybe be able to chose on the CMS page which subfolder route it belonged to.  I saw the category page  I'd like to have two "subfolders" one with the /content/ and another with a different name /content2/.

Share this post


Link to post
Share on other sites

Great, I found it.  Now how can I create two CMS routes?  I had hoped I could edit a file and maybe be able to chose on the CMS page which subfolder route it belonged to.  I saw the category page  I'd like to have two "subfolders" one with the /content/ and another with a different name /content2/.

 

I do not know how this could be done with native PrestaShop.

 

Please post new topic to get best community review.

Share this post


Link to post
Share on other sites

What I've done is create a second category in CMS (preferences > CMS) so I can have a blog on the site without the need for a seperate module.

Additional pages for the blog get entered in that category. Is this what you are after?

Share this post


Link to post
Share on other sites

Removing content/ and leaving it blank will create a 404  having it just be 

 

/{id}-{rewrite} Will have a working page, but it will put // before the page name. 

 

What I did was make my route to cms page rewrite look like this

 

{rewrite}-{id}.html

 

and it works.  It does add .html to the end of the URL, but it get's rid of /content before all cms page urls

Edited by steves (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

The default CMS path for a CMS page is /content/

 

It's possible to change it by changing “content” in “^content/” in the .htaccess file to another word and then changing “content/” in the getCMSLink() function in classes/Link.php to match.

 

source : http://www.prestashop.com/forums/topic/143069-solved-cms-pages-friendly-url-breaking-links/

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More