I'm doing a language picker, that permit to change between english and french, the application is on Jahia.
I would like to get the [j:fullpath] from the page I'm on from the jsp of my component languagePicker, but I don't find a way to get it. I need the j:fullpath of the current page, current page is actually ..../home/html, but $(currentNode.path) answers me :
/modules/template/02.02.01.10-SNAPSHOT/templates/base/navbar2/navbarlinks-lang
But I would like something like : " /sites/services/home", it is my actual j:fullpath for my homepage. Under this node, there's a "VanityUrlMapping" and under again 2 nodes, one for each language.
There's a vanityUrlmapping under each pages, so how to get the j:fullpath of these pages in a JSP ?
Thanks
If your component is stored under a "normal area" (not absolute) you can go up the JCR until you find a node of type "jnt:page". This can easily be done using the following taglib: http://downloads.jahia.com/downloads/jahia/digitalfactory7.0.0/digital-factory-taglib-7.0.0.0-tlddoc/jcr/getParentOfType.fn.html
If you are trying to implement a custom language switcher for Jahia you should probably build a custom view based on the default Jahia language switching component:
https://github.com/Jahia/default/blob/master/src/main/resources/jnt_languageSwitcher/html/languageSwitcher.jsp