[SOLVED] Unique ID for a NodeType

Is there an easy way to add an unique ID automatically in my template? I’m new to Neos and maybe I overlooked something in the documentation. It’s sufficient if the ID is unique within the page.

Here a simplified version of my NodeType template to show what I’m trying to do ({XXX} should be an unique ID):

{namespace neos=Neos\Neos\ViewHelpers}
< style >

    #{XXX} {

    <f:if condition="{backgroundImageDesktop}">

        background-image: url({neos.media:uri.image(image: node.properties.backgroundImageDesktop)});


      background-image: url(http://placehold.it/1680x640);




<div id="{XXX}" class="image--container stage">

Most likely {node.identifier} could do the trick for you

1 Like

Thank you! This variable did the job. Here how it looks now if someone else is interested.


<div id="id-{node.identifier}" class="image--container stage">

Rendered HTML:

<div id="id-23404ebf-e950-41b3-ad05-9933fed77aca" class="image--container stage">