Questions tagged [templates]
Questions related to the ExpressionEngine "templating" system.
556
questions
0
votes
1
answer
49
views
Problem creating templates / template group in the CP
Running EE 6.2.4
I recently upgrade from EE5 to EE6 locally, in the process of creating a new template/template group in the CP (by clicking on the Templates link in the sidebar), i suddenly got the ...
1
vote
1
answer
19
views
Pending comment
think a stupid question but don't see it. I have two channels with comment possibilities one the comments are pending and the other directly post the comment on the site. I want to pending both but ...
0
votes
1
answer
45
views
Text files no longer updating templates
I am building a new site using EE 6.06. I got everything set up with fields, channels, templates, partials, etc. and I was able to use my favorite IDE to edit the content, but when I sat down to work ...
0
votes
0
answers
50
views
After upgrading 5.4 -> 6: Error »Attempt to read property "group_name" on null«
after upgrading from 5.4.2 to 6.0.6 in the CP I get the error
Warning Attempt to read property "group_name" on null
ee/ExpressionEngine/Model/Template/Template.php, line 118
Severity: ...
0
votes
0
answers
25
views
Cloned ee2 site not working due to "undefined variable: templateGroup"
This is an EE2 site that I have cloned from production. I've copied all files and cloned the backing database. I'm able to enter the control panel and most things appear to be working.
However, when I ...
0
votes
1
answer
44
views
Trouble saving templates especially if there are more than a few lines in it
I have this weird problem where templates are sometimes saved and sometimes not. I would guess it has to do with a memory issue of some kind but I don't know where to look.
I run EE 5.3.2 fresh ...
1
vote
0
answers
57
views
Strange Maps output
I'm having trouble getting Maps to display the map correctly in my template. The basic template setup is like this:
{stash:embed name="layouts:global"}
{exp:channel:entries channel="{...
0
votes
1
answer
103
views
How to use segment_1 dynamically?
I would like to use segment_1 in my address to refer to different locations. For example, my-site.com/haiti, my-site.com/anchorage or my-site.com/portland. But they would always be directed to the ...
0
votes
1
answer
26
views
Error message when trying to open layout template
My other templates open fine from the EE backend, but when I try to open my layout template I get the following message:
Call to a member function getId() on null in [path]/ee/EllisLab/...
0
votes
1
answer
169
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
1
answer
58
views
How can i use json data in a template that i want to convert using angular2react package. I want to make it dynamic but template is static
I want to take json data and put it in my template. Actually i am using angular2react package to use angularjs code in my reactjs project
This is my component:
const component= {
template :<...
0
votes
1
answer
59
views
Add-On Index Page Throwing Parse Error That Is Not Correct
EE 5.3.0
When I go to the Add-Ons section of my control panel I get this error:
Parse error: syntax error, unexpected '.', expecting ',' or ';' in /.../.../public_html/.../ee/EllisLab/Addons/rte/ext....
0
votes
2
answers
31
views
How to dynamically output all products within a category on a dynamically created category page?
I'm building a site that has two main channels:
Product (this describes a meat, cheese or milk product). The user can then create entries describing the product, then categorise this product as '...
0
votes
0
answers
65
views
Disable Emojis from being rendered
I have a page in which I'd like to put a Sharepoint link, unfortunately the link contains :x: (https://mysharepoint....sharepoint.com/:x:/s/....) and EE is rendering the :x: as ❌, in view ...
0
votes
1
answer
13
views
Tagdata Fetch Params Not Accepting JSON String
EE 5.2.4
I'm developing a feature for custom analytics. Certain activities are saved as channel entries in order to be presented in a dashboard later.
I have the first part of the feature working. ...
0
votes
2
answers
87
views
Meta Title Breaking After Apostrophe
EE 5.2.2
The title meta tag from the default site html-wrapper template is this <meta property="og:title" content="{layout:og_title}">. It is working great for everything except if there's an ...
0
votes
1
answer
27
views
Class Method Returning Array Tagdata
EE 5.2.4
I'm trying to create an array that can be looped through as tagdata in the frontend template.
My method grabs results from an API query, identifies images from the result, assembles them ...
0
votes
2
answers
183
views
$_SESSION Variable in EE
[EDIT - I have posted the answer to my question below]
EE 5.2.4
I'm having issues trying to use $_SESSION in EE.
What I would like to do is save an Amazon cart ID in the $_SESSION. Working in ...
0
votes
1
answer
29
views
Passing Arguments To Class Method Using EE Template
[EDIT: I was able to answer my question. Answer posted below.]
EE 5.2.4
I have a class that will query an API using item ID and return data for that item.
I am aware that this structure:
{exp:...
1
vote
1
answer
162
views
Relationship Field Conditional Not Working
EE 5.2.2
I have a homepage channel with a primary entry that handles a bunch of stuff on the homepage. One of the things it has is a relationship field called featured movie that can have just one of ...
0
votes
1
answer
66
views
How to delete template variables, template partials, templates completely in EE5?
Templates, partials and template variables are automatically stored as files since EE4. But they are also stored in the database (in the tables exp_global_variables, exp_templates, exp_snippets - note ...
0
votes
1
answer
35
views
Moving "templates" folder in EE5
Do you have any alternatives for "tmpl_file_basepath" used in EE2 (it looks like this function has been deleted from EE3 version)? I wish to move "templates" folder above root but cannot find any ...
0
votes
1
answer
29
views
(A Different) Channel Entry Data Not Showing in Entry Detail Pages
EE 5.2.2
I have a site that I'm building for a client. It was my intention to have certain elements in the _html-wrapper layout be dynamic so they could change them as they desired (image, short ...
0
votes
2
answers
142
views
EE5 read from template files instead of database
I recently upgraded from EE2 to EE5. For my template groups and templates, I had a /templates folder that I used to save/load my templates. So the site read from that folder and not the database.
In ...
2
votes
1
answer
54
views
How can I share templates files between sites in EE5?
We used to have a template path setting for sites with MSM.
Now that setting seems to be gone, how can we share a single set of templates used by two or more sites ?
0
votes
2
answers
67
views
Display entry title inside an images
I'm sure this is a basic question (EE is not my bag): I am trying to create a fallback for an image's alt text where if the image does not have a description then to use the title of the entry in its ...
0
votes
1
answer
56
views
Issue with saving templates after upgrade
I have upgraded an EE 1.6.8 website all the way to the latest EE 5, but now I have a problem with saving templates. When I try to save a template after editing, the homepage shows up and the template ...
1
vote
1
answer
67
views
Transcribe for EE2 - export all variables?
I have an older EE2 site that will be rebuilt and not upgraded. There are almost 150 translations in the Transcribe module. Is there an easy way to export via db query or template code a list of ...
0
votes
1
answer
26
views
Template class error in CP
Recently I upgraded an EE2 website to EE5. After upgrade, everything working very well except I am getting error while trying to edit/create a template from CP or from Template Manager -> Template ...
0
votes
2
answers
519
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
3
answers
81
views
Accordion Feature Not Working [closed]
Hello—the dropdown accordion feature on this linked landing page on our site is not working. When you click the dropdown button, the accordion feature only stays open for a split second. This is a new ...
0
votes
1
answer
16
views
Settings in Admin get dropped, will save temporarily, hours later are reset/gone
I have a situation on my development site, where all of a sudden lately, some things I save in the admin, aren't "sticking" around.
Some of the settings that won't stay:
Template routes: I will set ...
0
votes
1
answer
53
views
Channel entries vs embed files
I’m having sort of a dilemma and since I never actually used channels in EE (yes, that is strange) except for a blog section I was curious what the real benefit is. I just don’t see it.
Let me make ...
2
votes
2
answers
272
views
How can I sort entries by ascending integers?
I am trying to use a custom field sort_order to order entries by setting the Field Content type of a Text Input to Integer.
I'm using EE2.
Expected behavior:
Entry 1 with a sort_order of 10
Entry 2 ...
0
votes
2
answers
82
views
Different content, different pages in global template
I am absolutely confused on what to do here
I have a footer that is meant to be different on each page I setup, I want to edit the link, the image, the paragraph and the header tags to what I choose, ...
0
votes
1
answer
87
views
Changing paths to directories in EE4
Specifically the Templates directory and Add-ons. How do I do it? Doesn't seem to be working in the config file like in Version 2. Cheers!
0
votes
1
answer
70
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
1
answer
101
views
How to detect an AJAX request in a EE4 template?
What's the best practive to detect an AJAX request in EE4 without activating PHP in the template?
With the previous version of EE, I used the Ajax Detect Conditional ({if ajax}, {if not_ajax}) from ...
1
vote
1
answer
34
views
Is it possible to use an extension in a template like a plugin?
I built an extension which works fine and I'm trying to make it work in my template but I don't know how to do and actually, I don't even know if it could work.
My code looks like:
class ...
0
votes
1
answer
162
views
EE4 Module Tab on Template Editor Page
Is there a way to add a tab on the publish form within the Template Manager like it is with the Channels?
For example, the Template Manager has the default Edit, Notes, Settings and Access form tabs. ...
-1
votes
1
answer
28
views
Making certain templates only show for certain authors
Want to know how to make sure a template only gets used when we want it
Our main article template for our columns runs ads
I need a template that has no ads for one of our authors. How do I ensure ...
1
vote
2
answers
137
views
General error when trying to access templates
Running EE 3.5.12
In the process of creating a number of new templates I suddenly got the following error:
SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xD5ve
fo...' for column '...
1
vote
1
answer
284
views
EE 4.0.4 - Save Templates as Files
User guide states:
Set Template Preferences
From the Control Panel, go to Settings ‣ Template Settings.
Set Save Templates as Files to Yes.
but there is no such setting on the template settings ...
1
vote
0
answers
33
views
PHP in Template Forbidden - Can't even save
On EE 2.11.7, I've enabled PHP on a template and set it to output and even a simple echo of some text between PHP opening and closing tags results in a Forbidden error page when I try to save the ...
1
vote
1
answer
203
views
Stripping line breaks from a template
I'm working on two templates which use the same snippet for outputting data. One is a HTML template which displays a table, the other forces the download of a CSV.
With some conditionals I've set up ...
0
votes
1
answer
102
views
How to get around pagination URLs
Does anyone have a neat solution to using pagination URLs? I would like to set up a simple structure like articles/article-entry with the listing and entry in one template. But once I include ...
1
vote
0
answers
95
views
Changes to Templates not saved as files
I have a EE 3.5.6 project. "Save templates as files" is enabled. When a change is made to a template in the Template Manager and saved, I get the notice that the template has been saved, however the ...
0
votes
1
answer
36
views
How do you stop the "category path" being put in URL's generated by {path=}
ExpressionEngine 3.5.10.
I am outputting a specific list of categories (category_group="1") from a channel of training courses (channel="training"). Followed by the list of courses assigned to that ...
1
vote
0
answers
87
views
Parse template and get content with PHP
I developed an extension for EE2 much earlier for parsing template to send the content to an email address. Now I am porting it for EE3 and facing problem that instead of returning parsed template ...
0
votes
1
answer
169
views
What's the field for the main content for XML export?
I found this snippet of XML code (http://www.phpdevtips.com/2011/08/how-to-import-an-expressionengine-blog-into-wordpress/) that has everything set up for the XML export of one of my client's old site....