solved Multi-Skin Coding for Modules

PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
OK, I just had a brain storm that I need to pass by you guys. Hopefully, @nate can jump in on this thread.

What do you think about coding some css flexibility into the modules like:
<div class="{blog_container}">
  <div class="{blog_item}">
So, that we can give the skin more control over the modules. In my multi-skin environment, it is nearly impossible to customize the module templates so that they look correct across all skins.

I am going to start working on this, but any advice, or potential issues, or just a "heads-up" would be greatly appreciated.

Hope this leads to another great thing for Jamroom. :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 10/08/16 09:29:07AM
michael
@michael
8 years ago
7,715 posts
IDEAS:
* add multiple classes.
* use the same classes names for all your skins.

Each skin can over-ride any module template for itself:

Docs: "Altering a modules template"
https://www.jamroom.net/the-jamroom-network/documentation/development/1051/altering-a-modules-template

So each skin can have its own version of the modules template and styled however it likes.

If you want to set the css classes in just one location, perhaps the TEMPLATES tab of the module in the ACP, AND you dont want to use the same classes across different skins (for whatever reason) you can add more than one class.

<div class="skin1_blog_container  skin2_blog_container skin3_blog_container">
  <div class="skin1_blog_item  skin2_blog_item skin3_blog_item">

Then in skin1 you can use one set of css to target one class, while in another target a different class.
gary.moncrieff
gary.moncrieff
@garymoncrieff
8 years ago
865 posts
Yes this is one of the advantages of Jamroom, I had been setting up different skins to be used as profile layouts, and having the css in each skin keeps this nicely organised.

Tags