Posted: June 8, 2017 at 11:57 am
|
Hi, 1. variations for the template pack – the documentation on registering a messages template variation talks about adding the code in “the main plugin file” – are you talking about the variations plugin, or the template pack plugin? 2. If I’ve already installed the template pack plugin, why can’t I modify its default CSS, instead of using another plugin and/or registering a variation within the template pack plugin to modify the message styles? (I’ve tried modifying the default css files provided int the variations folder within the template pack plugin, and they do not affect the messages). Please tell me if what I am thinking I need to do to make any changes to the message templates (HTML and CSS) is correct: |
Hi there, The variations are for CSS options. So for example you can have one template, then select different CSS options for that template. The template packs are for changing structure, including html, for the default templates. Can you point to the language in the documentation where you need some clarification? |
|
|
In another support thread, when someone asked about modifying CSS for a template pack, the response was to check the documentation here: https://github.com/eventespresso/event-espresso-core/blob/master/docs/E–Messages-System/registering-message-template-variations.md Does this clarify? Thanks! |
That’s covered here: So even if you don’t have an extra variation you want to add to a new template pack, you still register the default variations. You can also add extra variations by registering new variations, and those new variations can be included in the same plugin as your template pack. |
|
|
Hi Josh, list the variations supported by the template pack: Nothing in the below code suggests designating a default variation and I am unclear as to if it matters where these variations are registered (in the same plugin / in a variations plugin). Change the label used on the default variaton. (? the default variation in my admin still just says “default” after the plugin is loaded and the new template pack is selected): |
If you wish to override the default variations for your template pack, then you can do so by defining the variation CSS in the specific naming schema in your template pack’s variations folder. This indicates to the system that you wish to use defaults as defined by your template pack. You can see how we did this in the plugin example: https://www.evernote.com/l/AATJGRRoxgdLVqjZTTRLCtRHweiu62oZ0H8 So for example if you have a /templates/variations/email_default_default.css file in your message pack, EE will use your default for email messages. Otherwise if it does not find that file in your message template pack plugin, it uses the default from the core plugin. |
|
|
Hi Josh, thanks for your quick replies. I do have a email_default_default.css in the template pack folder at /templates/variations/, and I did add css to this file that references classes used in the new templates, expecting it to work as you described above. However that CSS isn’t being picked up, so I assumed this was not the way to do this. html from template file: css from email_default_default.css: In the wysisyg editor for the message, the template is loading and [COMPANY] shows white. when I do a test send, it reverts to the #444 color used in the original default file. |
If you can compress your plugin into a zip file and upload it to a fileshare service, then link here (or even push to github) we can take a look at what you’ve got so far and investigate further. |
|
|
Hi Josh, here is a link to the zipped plugin. |
Thank you. This took a bit of time to troubleshoot because there was more than one thing blocking the way. One is, the plugin folder name must not contain spaces. So instead of The other thing is the email_default_default.css file is incorrectly named in the mock add-on. The default email template should actually be named: |
|
|
Hi Josh, I am testing this but running into some issues that need to be addressed before I can fully test this and will follow up on the threads I started for those. |
The support post ‘Custom template pack and variations setup’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.