Questions tagged [variable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
52 views

What is the updated version of assign_variable?

In former days {assign_variable: my_var="foo"} was a very handy tool. I haven't used it for some time and discovered that it was deprecated in EE 4.x but was not able to determine what if ...
0
votes
1answer
72 views

CE Image, variable not parsed inside src image

I tried to insert a custom field variable, Stash here, a simple custom field as a text field works fine (the value is parsed), but when I use a pair tag (as Fluid, Grid or another add-on), or a Stash ...
0
votes
1answer
65 views

Call a variable from a module that was created in an extension

Is there any way to pass a value from an extension to a module or a plugin in ExpressionEngine? I created this very useful extension to take advantage of the expresso store module: <?php use ...
0
votes
1answer
65 views

Insert Selected Channel into the Template

We are creating a template that our client would use on many pages of their website, for example 'Accordion Layout Template'. So we create a page 'Bikes', assign the 'Accordion Layout Template', then ...
2
votes
1answer
56 views

How To Create Headers For A List

I have a list of items. Each item has a season. I am trying to organize the items by season. I believe the list is pre sorted and I need to create a header everytime there item has a new season In ...
0
votes
1answer
246 views

Freeform: pass variable to confirmation page

I have a freeform form with a text field with a value. Users of this form are not logged in and I need to pass the value of that field to a second confirmation page where I am building a paypal form. ...
0
votes
1answer
98 views

CE Image {height} & {width} variables outputting incorrectly

I'm using CE Image 2.4.5 on EE 2.9.3 and it outputs the image cropped correctly. However I also need the {height} and {width} variables elsewhere. The problem is that both of these variables are ...
0
votes
1answer
25 views

EE3 How to show random template variables

I created some template variables which is https://docs.expressionengine.com/latest/templates/globals/template_variable.html, how can I show one of them randomly?
1
vote
0answers
54 views

using stash variable with same name like EE var

loping through channel entries tag, I can use {title} for the title of the article. inside the channel entries loop for the specific article, I use an EE partial with get list inside. Inside the ...
1
vote
0answers
298 views

template variables not parsing inside javascript

I have some javascript in a template and when I try to use template variables inside the ... tags, the template variables are not parsing. All other template vars on the page are parsing as ...
0
votes
1answer
49 views

Is it possible to limit display of products in the catalog on a per template basis in Brilliant Retail?

In BR's settings, it is possible to limit the number of products displayed in the catalog and paginate the results. However, that seems to set the limit for any and all catalogs referenced throughout ...
0
votes
2answers
95 views

Conditional statement syntax

I am working on an Expressionengine site at the moment, the client would like the ability to choose if there's a custom phone number in the sidebar of the page and if non is entered it just shows the ...
1
vote
0answers
66 views

using Stash to output a language variable with Transcribe

In my article template I'm doing this: {exp:stash:set name="article_lang" parse_vars="yes" parse_depth="2" parse_tags="yes" parse_conditionals="yes"} {exp:switchee variable="{transcribe:...
1
vote
1answer
43 views

Something wrong in Stash usage and cannot figure out what

I have this code {exp:channel:entries channel="katalog" limit="12" dynamic="yes" status="open" show_future_entries="no" orderby="date" sort="desc" disable="member_data" pagination="bottom"} {!-- if ...
1
vote
2answers
389 views

Freeform Pro Dynamic Admin Notifications

Is it possible to use a form field as a variable address to send admin notifications to different addresses? The scenario is that the notification needs to be sent to a different address dependent on ...
1
vote
1answer
365 views

check if a segment is a number

I am trying to figure out a way to set to variable values depending on if a specific segment is a number or not. First how to I check if the segment 2 is a number or not? I want to apply this type ...
0
votes
1answer
74 views

I'm having trouble getting simple IF statements within a Playa tag to evaluate properly

Channels and Fields Summary: Tours channel - stores a list of all Vacations the site offers tour_specials field - a Playa field, linked to the Specials channel indicating which Special Offers apply ...
1
vote
2answers
474 views

Insert Code into Middle of Channel Entry Post

I have a channel that stores ads (HTML ads I created and the Google Adsense Code block), and displays either my html or Google's JS to allow a random ad on each page load. I want to insert that ...
0
votes
1answer
1k views

jQuery Chained Select & JSON

I am using a jQuery Chained Select Plugin. But getting stuck loading the data dynamically to select options from my Expression Engine template. Seems pulling the value from the JSON url is causing ...
0
votes
3answers
53 views

Sorting pictures with matching dates into galleries

I am attempting to build galleries of photos based on {photo_date}, a custom field containing the date on which each photo was taken. My list of photos looks something like this: Photo# {photo_date}...
1
vote
1answer
942 views

Are {layout:set} variables available to all extended layouts?

I'm trying to make sure I understand the scope of {layout:set} variables, compared to how embeds work. Traditionally, variables set with an {embed="template_group/template variable="foo"} are only ...
1
vote
1answer
225 views

Expresso Store + outputting store variables using PHP in XML. " and / are blowing up the whole operation

Alright so let me first say that this particular project is very odd and it has snowballed considerably in the past few months. I am not a master PHP programmer. What I am is a web developer with ...
0
votes
1answer
149 views

Include CSS file in JS

I have a problem with url in js file First, in Snippets i have code In that init.js i have that (function($) { skel.init({ reset: 'full', breakpoints: { global: { range: '*', ...
0
votes
1answer
88 views

Is there a way to pass a category id from one entries loop to another?

I am building a site for a school. The school has classes and the school has events. Some of the events are school-wide and some are specific to a certain class. On a class detail page (domain.com/...
2
votes
1answer
95 views

Appending more data to a layout variable

I'm using template layouts, and setting variables with the {layout:set} tag. Is there a way to append data to an already set variable?
0
votes
1answer
40 views

How do I create a single template tag which outputs multiple bits of data?

I have just created my own module and need a bit of help displaying the content on the front end. I currently have some template tags {exp:address_book:contact}{/exp:address_book:contact} and within ...
0
votes
1answer
50 views

Using a custom variable further up the page

I have a channel field with no results {if no_results} set variable here {/if} I want to set a variable but use it further up the page {if my_custom_var != "empty"} do some layout stuff here {/if}
0
votes
3answers
114 views

var_prefix= not working as one would hope

OK revamped question: now it displays all the right stuff but it doesn't interact with the tabs and stacks them all in a static display. straight forward EE code works fine. Once i insert the prefix ...
1
vote
2answers
630 views

Expression Engine - Passing Custom Field Variables to Layout

I'm trying getting to grips with Expression Engine. Specifically passing custom field information to a master layout I have created two template groups. One for the overall layout including the ...
0
votes
2answers
487 views

Template variable not parsing

We have a custom third-party module called qo5. All of our controllers are in there. I have a template that I need to pass a variable from a PHP function to. {exp:qo5 action="deal/getDealCode"} ...
1
vote
1answer
84 views

Switchable display order for playa field items

I'm trying to arrange it so that the output order of a Playa field can be controlled by a global variable or radio button channel field (to make it able to be toggled from the listed order to random) ...
1
vote
1answer
59 views

using globals in channel entry tag

so I am trying to use a dynamic variable, this works {member_id} {exp:channel:entries channel="vacancies" author_id="9"} and this does not {member_id} {exp:channel:entries channel="...
1
vote
2answers
81 views

How to pass variables and then display the results?

Is there a plugin, technique, or combination of plugins/techniques that will allow me to do the following? My channels are like this: Parent: Product Children: Colour, Size, Style, etc. A search ...
0
votes
2answers
422 views

adding a variable to a partial template

I am using creating template parts (header, footer) but would like to know how I can add a variable, a body class to individual templates. I see people are using stash but is there another way to set ...
0
votes
1answer
81 views

How do I resolve this scope issue with Stash?

I'm just playing around with implementing Stash on a site, following the Template Partials Using Stash article, but now I seem to be having a scope/execution order issue. Layout <html> <...
4
votes
1answer
2k views

Create a variable from a URL's Query String

How can I create a variable that is pulled from a URL like the one below? eg: http://www.example.com/page.php?Item_ID=774&score=42 Need to pull the number "42" from the url and placed into a ...
2
votes
1answer
46 views

calendar, more efficient code

the goal: -show the remainder of the current month's events always -when end of month is near (after the 18th, for example), also show the upcoming month's events this is what i have presently, ...
1
vote
1answer
109 views

Stash embeds containing multiple nested plugins doesn't retrieve anything

I'm trying to do some stash embeds but when embeds contain nested plugins (so, more than one) he doesn't retrive any value. {my_loop}{stash:embed name="my_total{count}" file_name="_stash:...
1
vote
3answers
139 views

Invalid EE Conditional Variable

This error: Invalid EE Conditional Variable Filename: libraries/Functions.php Line Number: 2761 occurs when I have this code in a BrilliantRetail template: {items} <tr> <td class="...
1
vote
2answers
3k views

Variables in templates

I want to update a variable based on my module. I can pass the variable from the main template (say A) to the embedded one(say B). But how can I retrieve this variable back in Template A after ...
1
vote
2answers
205 views

Switchee with multiple stash variables only evaluates first variable

I have the following code: {exp:switchee variable="{exp:stash:get name='custom_sidebar_text'}/{exp:stash:get_list name='related_articles'}/{exp:stash:get_list name='related_events'}" parse="...
0
votes
1answer
76 views

Store Data in Channel Tag Variable

I'm using the EXP:QUERY tag to get the count of a channel. And I am basically trying to use this for page pagination, and its a custom pagination because of the type of template I'm building. And I ...
0
votes
1answer
122 views

get function value in a plugin

i'm trying to write my own plugin and new to php to simplify i want to grab a string from the tempalte then do something with it How do i call getMyString() in another function? EDIT: class test { ...
0
votes
1answer
309 views

Passing preload_replace variables into a plugin

I've been working on my first EE plugin today, and I need to make it dynamic by passing either a PHP variable, or I would have thought I can use a preload_replace variable, from the template that ...
3
votes
1answer
388 views

EE 2.6.1. Combine relationships and related categories for editorial workflow

On our Single entry pages we recommend other articles. Four slots are available. channel: articles. channel fields: Content Elements field for the text and a native EE Relationship field called "...
1
vote
1answer
190 views

Channel Images and Matrix / Increment a variable/count within a matrix field?

Is there a possibility to increment a variable/count (something like "i++") within a matrix field so that the variable is incremented for each row with certain parameters? The background is that I ...
2
votes
1answer
388 views

Passing Variables

I hardly know any OOP PHP so I don't know how to properly pass variables, especially in EE. I am working in a Module, and I have a function that passes my modules results to a .php file that has the ...
1
vote
1answer
759 views

Parsing JSON in EE tag

We have a BrilliantRetail cart and I'm adding JSON data into an attribute named itemJSON. In the cart template, we loop through the items in the cart using the {items}{/items} tag and I need to show ...
4
votes
3answers
128 views

alternative to php var in template?

It's been a solid year since my last ee project. The things you forget over time :) At the top of my template I show the latest featured entry (limit="1" search:featured="yes"). Later in my template ...
0
votes
1answer
194 views

Can I use Stash inside Third Party Module Tags?

in the examples of Stash and every other similar plugin I always see the variables being set inside the channel:entries tag. But what if I need to set a tag inside the tag of another module? Like for ...