Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
4 votes
Accepted

How to reference snippet variables inside a stylesheet template

While use cases for it are rare, CSS templates can parse tags if you need them to, but you must link to them with {path='template_group/css_template'} instead of {stylesheet='template_group/...
user avatar
  • 2,255
3 votes
Accepted

How do I allow users to add a snippet without having to access the template?

Snippets are not intended to be used by / known by end users. They are developer tools for making your code more DRY - not so much to hold content. This is why the access to them is through the ...
user avatar
2 votes

How to reference snippet variables inside a stylesheet template

EE's CSS and JS templates do not parse variables or tags. They're just static templates. Best to avoid EE altogether and just create CSS and JS files on the server. To still be somewhat dynamic, you ...
user avatar
  • 11.3k
2 votes

Include CSS file in JS

First of all, the stylesheet tag needs quotation marks. {stylesheet="global_embeds/style"} If you link to the JS file using path variable, all the templates variables on the linked file will be ...
user avatar
  • 6,108
2 votes
Accepted

Why are all snippets loading several times on page load?

The snippets are not actually "loading" - they are simply bits of text being stored in memory (much like global variables). They aren't actually processed until they're called. So they're not an ...
user avatar
  • 17.4k
2 votes

Use php inside entry-field instead of snippet

So if you only want a snippet to display on certain entries, you can apply that via a field and small code addition to your template(s). I understand you have a lot of templates and don't want to add ...
user avatar
  • 5,900
1 vote

Use php inside entry-field instead of snippet

It is possible with a bit of messing around you could achieve what you are trying to do by installing the Allow EE Code add-on. This add-on makes it possible to evalute EE template code placed within ...
user avatar
  • 3,562
1 vote
Accepted

EE 2.5.5 how to use snippet in if statement

If you look at the parse order of the template engine, you'll see that although snippets do get parsed before conditionals, standard global variables (which includes {site_name}) don't get parsed ...
user avatar
  • 17.4k
1 vote
Accepted

Embedding snippets or templates from wysiwyg?

I'm not so sure on the Expresso Editor, but if you are using WYGWAM as your WYSIWYG editor... If this is the case this might be of some interest to you : https://github.com/pixelandtonic/...
user avatar
  • 2,418
1 vote

Insert Code into Middle of Channel Entry Post

Another option would to go with a Blocks or Content Elements approach, where your content is actually a list of content building blocks. Then you can have any combination: text-ad-text, text-ad-ad-...
user avatar
  • 418
1 vote

White screen with syncing files

So as it turned out, this was nothing to do with EE or any of the addons installed. We had installed Trace to manage db changes between environments. For the most part, this worked well...until it ...
user avatar
  • 2,473
1 vote

Email encode tag Javascript issues

I know this is old, but I ran into this issue and fixed it by setting "Automatically turn URLs and email addresses into links?" to "No" in the appropriate Channel's preferences page (Admin -> Channel ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible