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 » General » URL translators
expandshrink

URL translators

URL translators

Tuesday 26 June 2012 5:13:35 pm - 4 replies

Hi (appologies if this is novice, however I am novice myself to the EZ Framework),

We have a folder in our eZ installation named: 'Competition'. It holds within it all the competitions (which are essentially classes).

If we create a new comp we go, 'create new' in the admin GUI > select the comptition class. However, we then need to write a mod-rewrite specific for the competition we have just created in the URL translate...

This is where the problem arises: When the marketting side of the company create a new comp. they can not be expected to know how to create a new url translator.

Every url translaror looks like:

/places/the-comp-to-win-a-cat/process

/places/the-comp-to-win-a-dog/process

As the start and end will always be the same, is it possible to write some sort of wild card as a catch all which will essentially do this:

/places/*/process

Where * can be any name of a competition?

 

I appreciate this maybe a novice question but i am a novice to the framework my self.

 

Regards,

John

Modified on Tuesday 26 June 2012 5:14:26 pm by John Carmichael

Tuesday 26 June 2012 10:20:12 pm

Don't worry about being a novice -  we've all been there happy.gif Emoticon

However, before trying to answer your question, I need to know why you feel you need to use mod_rewrite for this task?

Modified on Tuesday 26 June 2012 10:20:37 pm by Daniel A. Øien

Wednesday 27 June 2012 10:55:05 am

 

Hey, thanks for replying,

 

Sorry i think i didn't explain myself properly... I actually am wanting to avoid using mod-rewrite and want to use the eZ framework.

 

I want to write a wild card catch all for the following:

places/competitions/somerandomcharactors/process

places/competitions/somemorerandomcharactors/process

places/competitions/somermoreandmoreandomcharactors/process

with:

competition/process

 

My own attempt at writing a rule for this:

places/competitions/*/process

with

competition/process

 

Didn't work...

Wednesday 27 June 2012 1:26:26 pm

Hi John, I've used wildcards at the start & end of a phrase, but never in the middle, so I had to try this.... and it worked for me.

What version of eZ Publish are you using?

Cheers,
Geoff 

Thursday 28 June 2012 10:20:27 am

Hi Geoff,

 

We are using the following installation:

Community Project 2012.2

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from