Weavium Kalendar and RWML


@weavium.plugins, @willwood

I am building a private website being available in multiple languages, and the RWML stacks are the well-suited building blocks to accomplish this task. However, I ran into an issue when using the Kalendar stack from Weavium to display events.

I have multiple Kalendar stacks each enclosed in a RWML wrapper, and they display properly according to the language setting. Except the events are only shown in the one calendar module, that was defined last in the RW project. I am aware that such a problem might fall through the cracks right in between the two stacks used, but I still have hope, someone can help me out - I might be simply doing something wrong ;)

Please have a look at the example website that I have setup to demonstrate the issue: Https://kalendar.michiworld.com

Thank you so much, Gerd


Unfortunately, there has been no reply from either of the stack developers yet. After searching a little bit more on this topic, I stumbled across a response from @tav in a different forum (Limelight & RWML), where he explained that RWML stacks work only well for content replacement, but css or JS code isn’t dynamically changed possibly leading to problems with more complex stacks.

This is very likely the case for the Kalendar stack, where events are dynamically shown on the left side when a respective date is picked. Though way outside my ‘comfort zone,’ I tried to use the browser inspector to look at the JS scripts and the generated HTML code - there indeed seem to be references in the script to pages not available depending on the language setting (but this also seemed to be the case on the main page with both calendars visible, so what do I know ;).

In this context, however, another idea crossed my mind - and I could use some help to test whether it is possible to get it to work: instead of using the PHP server side exclusive loading of different Kalendar stacks, load them all (like on the main page in the example), but make only the stack with the proper language visible. According to @willwood RWML support page a standard language tag (e.g. <div lang="de"> ... </div>) should work with RWML suppressing the display for inactive languages.

Though not sure whether it solves my problem, I would like to try it, but already stumble with the basics of mixing stacks with direct HTML code: How could I add the lang="de"tag into the div of the Kalendar stack. Or how could I enclose the respective Kalendar stacks into divisions with the lang tag ?

Thanks anyone for helping, cheers.


I suspect the Lang= X is passed as a url variable. But that’s just a guess I haven’t used RWML but I have used other similar options.

Does RWML actually allow you to load all the languages and select afterwords? Maybe by clicking a button or by some other action?


RWML actually works with a cookie containing the language preference, but for compatibility reasons, it also allows to filter for the ‘lang’ attribute - hence my idea to load all versions of the required Kalendar stack, but filter for the desired one with the attribute. Typically RWML only loads the one required content stack, as the language check happens server side with a php script.


After searching a bit further, I found the ‘UsefulStack’ from Stacks4Stacks (also actually @willwood), which allows a plethora of settings - also the language setting I was looking for. Long story short, after embedding the various localised Kalendar stacks in an appropriately set UsefulStack, it actually all works.

Loading all localised Kalendar stacks, but only displaying one, is not optimal, yet it is a solution. Short of a better solution from either developer, this approach might help others in a similar dilemma.

If there are other solutions or stacks that can be used, I am still very open to learn more. However, the ‘UsefulStack’ apparently deserves its name to the fullest - thx @willwood for providing such a tool.


The link is no longer active now