Forums / Setup & design / How to manualy change the url_alias ?

How to manualy change the url_alias ?

Author Message

Xavier Dutoit

Thursday 19 May 2005 7:35:23 am

I've had the problem several time:
A create a node "A", then realise that's not the correct class, I create another name A under the same node, the url_alias is "A_1", copy paste the content and delete the initial node "A".

I'd like to be able to change the url_alias from A_1 to A. Is it possible ?

X+

http://www.sydesy.com

Bruce Morrison

Thursday 19 May 2005 3:57:46 pm

Hi Xavier

Make sure the initial "A" node has been removed from the trash then run the update/common/scripts/updateniceurls.php script with appropriate parameters

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Xavier Dutoit

Friday 20 May 2005 12:28:28 am

Hi Bruce,

Did it for the simple case, I'm afraid that's a little bit more tricky for some other cases (eg if you rename a node A to B, it keeps the alias A and it doesn't rename A_1 to A).

Between
kernel/classes/ezcontentobjecttreenode.php (updateURLAlias) and
kernel/classes/ezurlalias.php

and some SQL commands, I'm going to clean as I want it, hopefully without screwing too much my db ;)

For the record: add a --help on the updateniceurls list the options (like -s siteaccess if you don't want the default one).

X+

http://www.sydesy.com