Get the current Node in JSP with Jahia?

561 Views Asked by At

Is there a way to get the current node you are with Jahia ?

I tried to find in the documentation, but Jahia's not greatly documented.

tried to use ${node.path} but didn't gave me what I wanted.

2

There are 2 best solutions below

1
Kalas Yagami On BEST ANSWER

${renderContext.mainResource.node.path} is the solution.

0
Ultranova On

Use ${currentNode} to get the current node you are.

<%--@elvariable id="currentNode" type="org.jahia.services.content.JCRNodeWrapper"--%>
${currentNode}

https://academy.jahia.com/documentation