Share » Forums » Setup & design » Use id for url

Use id for url

Use id for url

Friday 27 May 2011 7:28:40 am - 5 replies

Author Message

Gaetano Giunta

Friday 27 May 2011 8:38:52 am

I suppose you know you can use /content/view/full/$nodeid and that it would not suit your needs, correct? Because using these urls all content objects are created equal...

As for data that is not readable by other users: this is a problem of permissions, not of urls. Because if you do not use permissions to block access to a given node, it will show up both in search results and when using the /content/view/full/$nodeid url syntax

Principal Consultant International Business
Member of the Community Project Board

Marko Žmak

Friday 27 May 2011 8:57:25 am

Sao, just a note...

When there are two subitems with the same name under the same parent node, eZ automatically generates different URL's for them. In your example that would be:

  • /parent/content
  • /parent/content_1

And when you use $node.url_alias for this nodes you'll get this different urls.

Does this help?

P.S. Your second option won't work properly if the same user creates two contents with the same name.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Sao Tavi

Friday 27 May 2011 10:29:13 am

Thank you for your replies.

Gaetano, yes, but how can I get that url? I mean... Using url instead of url_alias (in fetch ('content', 'list'..)) makes no difference. The documentation says that it depends "on a configuration setting", but that does not help much.

Marko, yes, you are right. So the user id part seems to be a wrong idea. So only the first option still stands.

Marko Žmak

Friday 27 May 2011 10:38:13 am

Thank you for your replies.

Gaetano, yes, but how can I get that url? I mean... Using url instead of url_alias (in fetch ('content', 'list'..)) makes no difference. The documentation says that it depends "on a configuration setting", but that does not help much.

Marko, yes, you are right. So the user id part seems to be a wrong idea. So only the first option still stands.

It's a little bit unclear what are you trying to do...

Why (and how) do you want to use url in fetch(content, list)?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Sao Tavi

Friday 27 May 2011 10:45:45 am

Yes, sorry, I was ambiguous. So I have a new class that in it's template gets it's subitems with fetch(content, list). I should have said directly in class ezcontentobjecttreenode.

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

36 542 Users on board!

Forums menu