Overwrite drawer.vm

I tried to overwrite the drawer.vm to replace the “logout” link with the “OIDC RP logout URL”. If I replace the drawer.vm with the content of https://raw.githubusercontent.com/xwiki/xwiki-platform/stable-12.4.x/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/drawer.vm it doesn’t work. In case I click on the “hamburger button” to open the drawer, nothing happens. No error is thrown.

Is this something which should work? Thanks in advance.

Does someone has an idea to change the redirect url of the “logout button” in xwiki and how to achieve this?

Hi!
I get a 404 not found on the link you posted. I don’t really understand if you want to replace the displayed text or the link.

The drawer.vm file: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/drawer.vm#L37.

For changing the displayed text of the link, you should replace the text between <a> and </a>.

For changing the link/reference of the link, all you should do is to replace the href attribute.

I customized the flamingo skin and copied the full file “drawer.vm” (without changing anything). Afterwards the drawer no longer appears. After removing the skin customization, the drawer appeared again. So, I’m not able to change anything in the drawer.vm curently.

I guess, changing the “xredirect=’’” would be what I need.

@sbernhard, regarding xredirect: https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/BestPractices/#HHandlingerrorswhenusingxredirectfornon-JavascriptUIs

So, what you should do is to override the drawer.vm, as you did already.
The thing is it should correspond with the version of XWiki you work on (in order to just copy-paste the code from github).

My suggestion is to see what’s your version and then check the drawer.vm file from that version (ie. version 12.5: https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-12.5/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/drawer.vm).