Page 1 of 1
Synchronize/convert all page aliases to URL
Posted: Mon Nov 15, 2010 11:15 pm
by luk407
I like new feature with custom URL, but is it possible to convert all page aliases to URL with one click?
Flat or hierarchy - depends on settings in "Site admin/Global settings/Content Editing Settings".
Maybe it will be good to add this funcionality in "Content/Pages - select menu" (convert URL of selected pages).
Re: Synchronize/convert all page aliases to URL
Posted: Mon Nov 15, 2010 11:22 pm
by calguy1000
Just use phpmyadmin:
for flat URLS:
Code: Select all
UPDATE cms_content set page_url = content_alias where page_url = '';
for deep URLS
Code: Select all
UPDATE cms_content set page_url = hierarchy_path where page_url = '';
of course, backup first. The upgrade does the first statement if you had use_hierarchy=false in the
config.php priory to upgrading.
However, there's really no need... because if the page_url is not set, the system will compare using the hierarchy path... no problems at all.
Re: Synchronize/convert all page aliases to URL
Posted: Tue Nov 16, 2010 11:03 pm
by luk407
Thank you.
This is the fastest solution.
Just one note - I changed query a little bit:
Code: Select all
UPDATE cms_content set page_url = content_alias where page_url = '' OR page_url IS NULL;