i want design divi module in divi library by using microthemer

Author Posts

Mohammadreza

hi i am using divi page builder. mybe you know abut it i can save module wih divi library . for example i made a text module with divi so i can save it to divi library and use it for another page. now i want style that module with microthemer.i know microthemer save css styles with specific page id but i dont want Load CSS on specific page . i want load css on specific madule ( that i already saved in divi library ) . so i want that when i load that module in any page by using divi .i want microthemer automaticly load that style css for the module

https://ibb.co/zPH8F23


Sebastian

I understand. This isn’t currently possible for Divi. But I will look into supporting this. I have already added support for loading CSS when a particular Bricks templates loads. And I’m including this feature in the upcoming Gutenberg integration (for Block theme templates/parts/patterns/navigation). I will move onto Divi and Elementor once I’ve released the upcoming Gutenberg integration.

In the meantime, the best option would be to use multiple conditions for each page (or type of page) where the module appears. It’s a bit manual, but maybe an option if it doesn’t appear on too many pages e.g.

is_page(5) or is_page(10) or ( is_single() and has_category("my-cat") )

Or, you could of course load the CSS globally (if maintaining the logical conditions too complex).

I hope that helps. Please let me know if you need any further assistance.

Cheers,
Sebastian


Mohammadreza

thanks.but how about my idea ?can i copy style of element that already desined by microthemer and paste it on another page ?if it be possible can i design element in a page with microthemer and copy my changes to another page ? does your plugin support copystyle option ?


Sebastian

Hey,

Microthemer doesn’t have a specific button for copying the styles you apply to an element. But it can be done fairly easily by:

  1. Going to the Code option (to the left of the Font property group)
  2. Copy all the style code inside the curly braces: { }
  3. Go to another selector and paste the styles between the curly braces

A copy button would make this easier though, thanks for the suggestion. I will add that soon.

However, when it comes to applying the same styling to elements across multiple pages, copying styles is not the most efficient and maintainable way to do it. It’s better to have the same styles load on multiple pages rather than duplicating them within your MT settings. That way, if you make a change in future to e.g. font-size, you only need to change it in one place and both pages will be updated.

That’s why I was suggesting updating your folder conditions, so that your styles within the folder can load on whatever pages you specify.

Now of course if you want the styling to be similar on different pages, but not identical, then copying styles is a fine approach. And a button to make this easier would come in handy.

Cheers,
Sebastian

You must login or register to reply to this topic.