I need to create a menu item entry, that doesn’t do anything. I feel, I had it working before, but cannot find the ‘proper’ solution again ;)
Is there a proper way of creating inactive menu items in Source ? Thanks for sharing your insights, cheers.
Hi @GKs - i think I must be misunderstanding something. What would be the point of it being there at all if it is doing nothing? Would there not be times that the user would need it to reset to Deutsch (e.g. if they were on the Japanese version). I think it is ok if the person selects Deutsch and the page reloads (if they are already on that page).
If I am completely missing the point let me know.
Yes, I should have given a reason for this ‘odd’ sounding question:
Up to now I created a multilingual website by using the S4S RWML stack suite, which allows to create a page with multiple language ‘blocks’ with the appropriate ones being served ‘on the fly’ by a PHP script depending on the current language setting. This works well, but in combination with other blog stacks, sometimes other php scripts, and for proper SEO descriptions, one runs into limitations using the ‘one page’ approach.
The other (maybe more typical) way to serve multilingual sites is to provide individual pages for each language needed. Following this approach it is relatively easy to split the project up into individual languages, all working on subfolder structures and having their own properly translated menu structure. Long story short, this is where the ‘do nothing’ menu entry would come in handy. If the user is e.g. already in the ‘English’ context, then clicking on ‘English’ menu entry doesn’t have to do anything, whereas the other entries switch to the other language context. In e.g. the German context, the ‘English’ menu entry provided within this subproject indeed switch switches to ‘English’.
Each language sub project has its own page and menu structure, and the switching between languages happens via the language menu. Each language has one menu entry pointing towards itself - this is the entry where a ‘do nothing’ would be perfect ;)
Ok - that makes more sense :)
Maybe others know of a workaround.
Why would you need to show this? For an english page I have the word DEUTSCHE VERSION in the menu. For the german pages, I have the word ENGLISH VERSION in the menu. So I will not use a case where I see the word DEUTSCHE VERSION on an german page…
FIRST - and most important:
@Fuellemann, @habitualshaker: you are - of course - 100% correct ! Why adding a UI element, which serves no function … except for some misguided aesthetic argument ;) Even my explanation just shows how one can miss the solution by being too close and stuck in an earlier thinking. Thanks for helping me taking a step back and realize the obvious - it’s simply not needed, and possibly even confusing ;)
Second - and almost irrelevant now:
I found a technical solution to what I was looking for - simply adding the href a-tag to the page title in the left-hand page menu, e.g.
will do the trick … though no longer needed ;)