5

There are a few possible solutions available here: 1. Global variable approach Amend your plugin so that it sets a global variable instead of/as well as returning the value directly. This ensures that it is parsed very early so you can use it as {cid} in tag parameters. You can set a global EE variable like this in your plugin: $this->EE->config->...


2

Repeated use of an identical single tag (as would be generated by the looping of the Playa tag pair) will cause EE to cache the value of the first instance. That means subsequent tag instances would be replaced with a marker such as M00093... which are then replaced with the value of the first instance later in the parse order. I'm not sure why these ...


2

I've found a way to do this; not sure its the 'right' way, but it works and seems logical :-) {exp:plugin_name parse="inward" variable_to_pass="{some_id}"} Then in the plugin: $my_var = $this->EE->TMPL->fetch_param('some_id');


2

Not sure what existing solution there are, but I would just create a real simple plugin with pkg.io. Basically, your constructor method would look like this: public function constructor() { $json = json_encode($this->EE->TMPL->fetch_param('json')); // Now you need to parse the JSON object. This will be unique // depending on what your ...


2

There's a better way, though I'm not sure what where you're trying to insert the entry's category_id. Use Stash, you'll be glad you did. {exp:channel:entries} {exp:stash:set name="category_id"} {categories limit="1"} {category_id} {/categories} {/exp:stash:set} {/exp:channel:entries} <!-- Then get it after entries ...


2

There's no native way of doing this as far as I know so you'd probably need to do this programmatically via a custom addon that rewrites IMG tag based on the URL segment. This is a classic case where using a fluid fieldtype for "body" content is useful, that would make swapping IMG tags based on URL segment a piece of cake!


1

None of your conditionals are affecting the value of your preload-replace. Preload replace processing happens very early in the template parsing engine. The engine simply applies the first value you give. You can't assign preload replace variables dynamically. From the docs: ExpressionEngine allows you to assign text to be replaced prior to a template ...


1

This is an instance were you will need to quote your conditional, since it's not a true variable. Starting in version 2.9.0, the conditionals parser learned how to behave, and parses conditionals as soon as they are ready. Since what you have in the first example doesn't look like a valid variable, it doesn't know to wait for a value before evaluating it. In ...


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