Hot answers tagged

8

You can do this without editing the Wygwam source. First you need to create a custom config file for CKEditor. Create a JavaScript file called something like 'ckeditor_config.js' and then set Wygwam to use it. You can do this by adding an advanced setting to your Wygwam editor configuration. Add the 'customConfig' setting and enter the path to the JavaScript ...


5

I recommend using SEO Lite. It will save you from having to open up a channel:entries tag just to grab the title. Plus it can be used for a meta description tag (which is also useful for og:description and social share text). And it has a variety of useful parameters to help you pull the right title and to add prefixes or suffixes to your title. Just ...


4

This way is not possible because of ExpressionEngine’s Parse Order Parse advanced conditionals Process embedded templates With your code you don't have "yes" in conditionals when EE parses it, you have "{embed="test/foo"}"


4

As I told you earlier today, this is not a Low Search issue, but a conditionals parsing issue. If you turn on Template Debugging, you'll see the opening tag just before it is actually executed. It will look something like this: {exp:low_search:results {if embed:author_id}author_id=""{/if} ... } That is what's executed, and what EE uses to set the internal ...


3

Stash 2.4.3 corrected a long-standing inconsistency with embeds set to process at the start of template parsing. At the other stages of parsing (inline and end) embeds are parsed by default - that is to say, parse="yes" is the default parameter value if not specified, and 2.4.3 added this as the default for start too. To make your embed behave as it did ...


3

I believe to do so, you would need to create a Custom Style Set for Wygwam. See the Wygwam Docs over a Pixel & Tonic. Though, I recommend creating a class instead of an id. Since someone will most likely add more than one media embed sometime in the future. Additionally, this StackExchange post deals with editing the Wygwam .js for custom sets.


3

Why not do it the other way around, where the template being loaded is what actually contains the complex logic? Then you can embed the rest of the template, passing the entry_id via an embed parameter. Alternately, write a simple plugin which performs your logic and returns the entry_id, then put your Channel Entries tag inside of that plugin tag pair (...


3

Not natively I believe. I typically use Stash to do this nowadays. It will give you persistent variables as well as template inheritance so you can do things like this. Wrapper template <!DOCTYPE html> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="...


3

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 Templates area of the CP rather than the Content area. Here is one approach to allowing users to create different sidebars - note that you could use the native ...


2

I would avoid using an embed in that case. An embedded template is the second to last thing to be processed, see ExpressionEngine's Parse Order courtesy Lowe. If you want to re-use that code you can use it in a snippet (and use an add-on like Brian Litzinger's Snippet Sync to manage snippets as files if that's what's been preventing you from using ...


2

Change your quotations: {if '{embed="common/.get-gender-url-title" chosen_gender_id="{exp:stash:get name='chosen_gender_id'}"}' != 'male'} UPDATE Sorry for the crappy first answer. Your issue is, as always, a parse order issue. Embeds are parsed after conditionals, so the conditional is reading the embed code directly (not parsed) as notacouch mentioned. ...


2

I'm not sure why you're using an embed for this, you're not passing anything to it so I'd use a snippet for sure. Also may as well use set_list, open the tags above the exp:channel call {exp:stash:set_list name="resources" parse_tags="yes"} {exp:channel:entries channel="white_paper|c_study|video|webinar|data_sheet" limit="8"} {snippet:get_data} {/...


2

The Variables plugin is a good option for passing data to the header embed. The variables plugin gives the possibility to create variables (either static or dynamic) and use them later on. This means that for example you can set certain data and use it in the head (if it's embedded) without having to re-create a tag pair for the specific channel. ...


2

EDIT: Please see the accepted answer above from Dylan as an approach for handling this type of functionality. nonprofit_tech's suggestion to try using a custom style set does work, but it involves a two-step process: the content administrator must first add the custom wrapper from the style set dropdown, and then embed the media via the toolbar's media ...


2

Example 1: In some cases {embed:entry_id} would be most useful by passing an entry_id from the parent template into the embeded one's entries tag pair entry_id parameter to just return the results of the given entry_id. {exp:channel:entries channel="your_channel" entry_id="{embed:entry_id}"} Just the entry that was passed from the parent template. {/...


2

In simple terms, that is how you call up the value of a variable declared within an embed tag. So for example, if in your "main" template, you insert an embedded template called sidebar: {embed="embeds/sidebar" the_passed_value="hello"} Then in the embedded template itself, you could have: I would like to say {embed:the_passed_value}. Which would render ...


2

Answer 1: Backup - files and database. Seriously, get that site under source control. If anything goes wrong it's easier to roll back. I'd just go straight to 2.8 -- I did one the other day going from 2.1.3 to 2.8 - if you run into issues then go for 2.7.x It shouldn't break them if you're using recommended ways of embeds and related entries.


2

As the docs explain, you need to setup your paths in your config: $assign_to_config['stash_file_basepath'] = '/path/to/stash_templates/'; The docs are here: https://github.com/croxton/Stash/wiki/Installing-%26-upgrading


2

In versions of EE2 prior to 2.9 if you start the template name with a dot it will not be directly accessible. In the just-released EE 2.9 you can specify a different character instead of dot and the default has been changed to underscore. Documentation on this feature (currently describes 2.9 handling): http://ellislab.com/expressionengine/user-guide/...


2

That's a lot of data so in addition to server performance, you want to consider client-side performance and the page weight. You could eliminate or minimize the server-side issue with long caches or using Varnish, but you'll still have a lot of data transmitted and potentially client-side heavy page. I'm guessing that the visitor only cares about info for ...


2

If you are using the split method in you php code, you shouldn't. If you see on the documentation page, the split method is being deprecated. You should use one of the alternate functions listed there. If you aren't trying to use regular expressions, you should probably just use the explode method.


2

You don't have the embed syntax quite right. Passing {embed:entry_id} is correct, as that tells the channel:entries tag which entry to load. But there are no channel:entries parameters called title or description. Instead, simply use them in the same way you used {embed:entry_id}. Also - in your example, {title} will actually be the title of the child ...


2

What you're looking to do is far from trivial, however.... Lets simplify first. Forget the pdf module, I assume you want to render your embed (and any other) tags and push the result into your pdf document (or anywhere else). In short you want EE Template in, Html Out. We can actually achieve this prior to the PDF creation, and avoid heavy modification of ...


2

I solved something simulair with https://devot-ee.com/add-ons/low-replace, an addon from LOW. I wanted special markup for any <a href in the RTF field. It works like a charm! In my case like this: {exp:low_replace find="<a " replace="<a class='lightview' data-lightview-type='iframe'" } {...


1

It's your process="start" parameter, I believe, that's messing you up. You're telling the Stash embed to process before the channel entries tag pair. Try removing process="start" and adding parse_stage="both". Stuartmcd69's suggestion is solid too. UPDATE: I respectfully bow out now that Mark has spoken. :)


1

a quick thought come to my mind is to create templates with the same name and change the prefix number for e.g: test_1,test_2,test_3......,test_100 then use this plugin to generate the random number: http://devot-ee.com/add-ons/random-between {embed='test_{exp:ga_randombetween start="0" stop="100"}'} Regard's.


1

You could use another field type for the images in the post. Grid would be one that would work without going to a third-party resource. Channel Images is a solid commercial addon that handles multiple images in an entry really well.


1

Why not simply copy the content of the embed into another, stand-alone, template and visit that? If there are parameters passed to the embed then just hardcode values into your test template.


1

And as I submitted the question (probably because of the process of typing it out logically) it dawned on me. The issue wasn't in the member group settings, it was in the access permissions under template management. Admins were not permitted to view that embed template for some reason. Corrected and now all is working.


1

Why not to use this? {if segment_4 < 10}0{/if}{segment_4} There's a lot of things the template language of EECMS can't, but... It is just a template language.


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