using offset with nice urls

using offset with nice urls

Tuesday 26 August 2003 2:24:48 am - 4 replies

Modified on Tuesday 26 August 2003 2:26:18 am by Ben Pirt

Author Message

Jan Borsodi

Tuesday 26 August 2003 6:37:58 am

Sorry to say this but it's not supported yet. We haven't come up with a good solution to it yet, right now the url must match the stored (nice) url directly, the reason for this is speed.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Ben Pirt

Tuesday 26 August 2003 6:50:00 am

I see,
couldn't you use strip the offset before looking up the match in the DB, then make the offset variable available in the template? Or does that just not fit in to the structure you have (I haven't hacked around with EZs php yet)
Cheers,
Ben

Jan Borsodi

Tuesday 26 August 2003 6:56:27 am

If we do that we would have to assume that all urls to eZ publish will use offset/4 as used in content views. This could easily break custom made modules, it could also give problems to urls where offset is the name of an object.

The best way I can see at the moment is to add some special character before all parameters to the url, like
my/nice/url/_offset/20
however this makes the url a bit uglier.

Another way is to use the ? parameter on urls, like
my/nice/url/?offset=20
but then we are back to even uglier urls, which is what we originally tried to avoid.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Ben Pirt

Tuesday 26 August 2003 7:10:23 am

I think I would even prefer the

/my/nice/url/?offset=10

approach because it still makes sense regarding which section the user is in. So if they were in the news section at least
/news/?offset=10

would make more sense than
/content/view/full/xx/offset/10

because 'content/view/full' doesn't really relate to the section you are viewing other than in a behind the scenes kind of way, which is what we're trying to avoid.

All the best,
Ben

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.