This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Developer » I love section_identifier. Is it...

I love section_identifier. Is it time for node_identifier?

I love section_identifier. Is it time for node_identifier?

Wednesday 25 April 2012 4:54:47 am - 7 replies

I'm running into frustrations, trying to spit out a unique user-friendly identifier for a node in the main language (mainly for css purposes, but also for template overrides and more).  So far I've used:

  • section_identifier
  • non-translatable content class attribute called identifier
  • $node.path_identification_string (great, but too verbose, and will change if moved)

I could explode the path_identification_string and pop the last string, but this does seem a little overkill for something that could/should be accessible from the node object.

Would love to hear how others resolve this issue.

Modified on Wednesday 25 April 2012 5:09:42 am by Geoff Bentley

Wednesday 25 April 2012 9:18:37 am

Hi Geoff,

you can use remote_id : it exists for node and content objects. At Heliopsis we mainly use the object remote_id for template overrides, fetches and css tagging.

Wednesday 25 April 2012 10:21:54 am

Thanks Benjamin - glad to hear it works across all 3.  

My point was more around having a user-friendly identifier which gives some context to the node, which is the reason why section_identifier was introduced - I was thinking more along the lines of using the URL alias name pattern from the content class, but in the main language only.

Using NodeID & RemoteID are all perfectly do-able, but are not user-friendly - they're machine-friendly.

Wednesday 25 April 2012 10:53:10 am

> Using NodeID & RemoteID are all perfectly do-able, but are not user-friendly - they're machine-friendly.

Correct, there is no such thing for nodes or objects.

I think Benjamin's point is that at least remote id (just like identifier) is persistente across different machines, import / exports, staging, syndication scenarios.

But they are impossible to remember, so if there is a need to remember specific content identifiers, then I suggest you write up a  Feature request with a use case in the community roadmap. And I would assume it should be optional, hence you should only have to add such and identifier / remote id alias if you need it, and editors should not even have to see it in the editing interface.

Modified on Wednesday 25 April 2012 10:53:43 am by André R

Wednesday 25 April 2012 11:28:05 am

Thanks Andre, I'll do that.

Wednesday 25 April 2012 12:09:16 pm

Just a further note : with ezxmlinstaller you can specify your objects remote_id and make them user friendly. I guess your override or css rules will only be about your main tree nodes which can be created programatically, not about the last news item created by an editor user.

Wednesday 25 April 2012 12:17:20 pm

Thanks Benjamin - I've looked at ezxmlinstaller before for managing content deployment, but never used it - will check it out again!

Thursday 26 April 2012 7:23:54 am

Hello All

for import you can use sqliimport. this extension let you choose remote_id of the object , remote_id of the node_id ...

then a small extension exist by jerome cohonner  :

i think you can achieve waht you want with it...



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

36 542 Users on board!

Forums menu

Proudly Developed with from