Questions tagged [template-scripting]
The template-scripting tag has no summary.
41 questions
0
votes
1
answer
256
views
$_SERVER['HTTP_ACCEPT'] is blank when caching is enabled
I had some working code within a template making use of the php variable $_SERVER['HTTP_ACCEPT'], to check for webp image format support from the user's browser. This was working fine, but after ...
0
votes
2
answers
634
views
Defining variables inside a template in EE 2.10.1
I can't find a way to define a variable in a EE 2.10.1 Template file.
I need to define a variable gv_desc only in some templates.
There are some references but no one works:
{global_var:gv_desc="bla ...
0
votes
1
answer
93
views
Possible to template without access to the server?
Is it possible (or even ideal) to template or even make a file manager within Expression Engine without access to the server? I was given the challenge to this recently with no success (and ALOT of ...
0
votes
0
answers
78
views
In EE3 can I query the Model service for template info in my template's PHP?
I want to do something like:
$templates = ee( "Model" )->get( "Template" )->all();
//Loop through them
foreach( $templates as $template ) ...
But when I try this, it hangs the page/server. Is ...
0
votes
1
answer
101
views
XML template 500 error with one category group
I"m setting up an xml template on an old site to use for importing to a new site via datagrab. Everything is working fine except when I try to output categories from one specific category group. When ...
0
votes
1
answer
352
views
php template shows code in {}
I use php templates when I need to send notification emails to multiple people.
Since upgrading to EE 2.10, I have noticed that when I echo the code, before the code that I am echoing, there is a ...
0
votes
2
answers
83
views
blank lines in parsed templates where template tags / logic exists
I am noticing a lot of extra blank lines for the lines where my template logic exists. I notice this mostly when I'm building javascript.
How do I go about preventing this?
Example:
<script>
...
1
vote
1
answer
91
views
Stash Shortcodes - last one outputs "home"
EE 2.10.1
Stash 2.6.5
I'm trying to set up some shortcodes using Stash on a rebuild of my site where I formally was using MX Jumper to do the same thing.
The code works fine except that the last ...
0
votes
1
answer
80
views
If statement is rendering to screen
I am trying to check if a variable exists, and render it only if it does. Using the code below, the "{if facebook_content..." etc renders to the screen, curley braces and all, rather than actually ...
1
vote
1
answer
107
views
Orderby title and organize by another custom field
I have a low search filter set up which works great however the client now wants to separate the results by country of origin. This should be possible as the country is set by another custom field.
...
0
votes
0
answers
246
views
Channel Form and Matrix - not saving Data
I'm building out a multiple page channel form which was working fine until I got to where I need to use a Grid/Matrix field. I was unable to find documentation on how to customize the look of Grid so ...
1
vote
0
answers
146
views
Complex nested playa relationships
I'm building a site where I'm having trouble wrapping my head around the logic needed to accomplish what I would like to do.
I have three channels: Brands, Regions, Business Unit.
Brands have a ...
4
votes
1
answer
252
views
What is best practice for protecting templates saved as files?
I've just discovered that all of the templates I'm saving to the filesystem are accessible through the browser if the name is known, and now I've got a case of the screamin' heebie jeebies.
For ...
0
votes
2
answers
168
views
Pass first level categories to switchee case value
I need to pass a list of the first level of categories to a nested switchee. The following works when I manually place the nested list. However I would like the client to be able to add/edit ...
2
votes
2
answers
1k
views
Use array values in expressionengine template
SUMMARY: I need to access an element in an array that is passed to a template from a module and test for it's existence.
I have a function in a module that looks like this:
function subscriptions(){
...