Jump to content

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.

 

 

Link to comment
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/.

Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

  • 1 month later...

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/

Link to comment
Share on other sites

×
×
  • Create New...