As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [templates]

Questions related to the ExpressionEngine "templating" system.

Filter by
Sorted by
Tagged with
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 ...
5 votes
7 answers
5k views

How to escape special HTML characters in output?

It is commonly useful to escape encode special HTML characters in output to avoid breaking output attributes (among other reasons): Take the following seemingly innocent template snippet: <!...
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
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
357 views

MSM Path Trouble in EE3

In EE2 there was the "Server path to site's templates" for each site in MSM. So it was possible to have two separated folder structures similar to: domain-A.tld (with whole ee system) /system /...
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
356 views

{site_url} global variable not outputting in php header redirect

Trying to create the following redirect template for some structure pages, however the url is outputting like this http://example.com/{site_url}#section. Any idea why {site_url} variable isn't working?...
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 ...
0 votes
3 answers
788 views

File Structure in EE

Just downloaded EE. Looking to use it for a project. I'm confused on there default file structure, I've found where my template lives... I'm just confused on all the other junk in the way. I would ...
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
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
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
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 ...
5 votes
4 answers
979 views

Cannot change the template assigned to an entry item

I am working on a complex EE site (version 2.5.2) that I've been handed that has a large number of templates. I wish to customize the template for a specific entry. I have created a duplicate of the ...
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
1 answer
437 views

Template routes and Pagination - blank page

I've got a blog listing template where pagination is not working as expected. I see the pagination links but when I follow one I get taken to a blank page. My template routes are: All links from ...
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:...
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 ...
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
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
1 answer
279 views

exp:channel:entries not working by any means

I cannot get any queries to work using exp:channel:entries. {exp:channel:entries orderby="date" start_on="2015-07-01 20:00" channel="shipments" limit="10" dynamic="no"} <p>inloop</p> {/...
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 ...
6 votes
3 answers
3k views

How can I manually parse template code from PHP?

Is there a way to evaluate an ExpressionEngine template using PHP in a custom plugin? I am using the Widgets plugin and want to create a custom widget type. I would like to define the widget output ...
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 ...
2 votes
2 answers
237 views

Unable to upload files

I need to get images added to a team page, however there is no error message showing, when viewing images that are in the library, they are showing as checkered boxes (checkered wallpaper). Not ...
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
88 views

ExpressionEngine: How do I block direct access to templates that I am using for embeds only

I have a template group that I am using to store embeds like header and footer. I do not want people to be able to directly access those templates by going to www.domain.com/embeds/header. I want that ...
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 ...
3 votes
1 answer
930 views

Create WordPress Export File

I'm working with a client that wants to migrate from ExpressionEngine to WordPress. I have an EE template that is supposed to (and seems to) generate a WP XML Import file. However, when I import the ...
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 ...
1 vote
1 answer
882 views

Show child categories but hide parent

I have a template that outputs a list of categories and any entries associated with them. All entries are assigned to child categories and none to the parent categories (the parent categories exist ...
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!
1 vote
1 answer
1k views

URL and Routing Issues, anything other than index gives 404

Hi I am fairly new to ExpressionEngine, but I am having an issue navigating from the Index Page. When ever I click on a link to view an entry it always gives me a 404 error. I think it might be a ...
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 ...

1
2 3 4 5
12