This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Existing URL - with number
expandshrink

Existing URL - with number

Existing URL - with number

Friday 30 September 2011 11:47:41 am - 4 replies

Hello,

eZ add a number by an existing URL - helloworld2
But this for SEO not really good, it is possible to add between "helloworld" and the number a "-" ?

The result should be: helloworld-2 not helloworld2.

Thanks for an answer.

Fishme

Friday 30 September 2011 4:21:12 pm

No, currently it is not possible.

Friday 30 September 2011 4:27:41 pm

Hi David.

 

You can not configure eZ Publish to do that.

 

A dirty solution could be to modify your eZ Publish sources. You can change them easily.

Open the ezurlaliasml.php file and go to the findUniqueText() method.

Change theses lines two times :

 // Every time you find :
$suffix = $uniqueNumber + 1;
// Replace it by
$suffix = '-' . ( $uniqueNumber + 1 );

Normaly, it's work.

 

See you,

Thomas.

Friday 30 September 2011 9:11:45 pm

Hi,

I think it's probably possible to achieve this in a proper way with a custom URL Filters.

Cheers

Tuesday 04 October 2011 7:27:56 pm

Thanks for the answers!

I don't like to change anything in the core, i think i will try with the URL Filters.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from