Questions tagged [templates]

Questions related to the ExpressionEngine "templating" system.

Filter by
Sorted by
Tagged with
0
votes
1answer
38 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
0answers
13 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
0answers
16 views

New page in site/page not showing up on index toute

When a new page is added to site/page, its url is site.com/site/page/url. However the older entries on site/page show up at site.com/url. Any ideas what's going on,?
0
votes
1answer
40 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
1answer
24 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
1answer
29 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
2answers
30 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
0answers
29 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
1answer
8 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
2answers
50 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
1answer
23 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
2answers
74 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
1answer
26 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
1answer
62 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
1answer
36 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
1answer
30 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
1answer
24 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
0answers
14 views

Using stash:cache to set last-modified header

We're looking to start using CloudFront's updated method for determining cache expiration that relies on the response having an accurate last-modified header. We use stash:cache tags around the entire ...
0
votes
2answers
70 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
1answer
50 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
2answers
34 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
1answer
45 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
1answer
63 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
1answer
24 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
2answers
270 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
3answers
58 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
1answer
15 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
1answer
46 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
2answers
163 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
2answers
75 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
1answer
71 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
1answer
35 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
95 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
1answer
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
1answer
153 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
1answer
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
2answers
113 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
1answer
215 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
0answers
27 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
1answer
153 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
1answer
79 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
0answers
77 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
1answer
33 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
0answers
76 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
1answer
125 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....
0
votes
1answer
124 views

How to upload/embed a MP3 file into expression engine?

Good afternoon. I am new to EE, and am trying to upload an MP3 audio file to our webpage. I am able to upload pics, PDF, etc..., but for some reason cannot figure out what to do for an MP3. Can ...
0
votes
1answer
27 views

Blank page output when using Entry Status in nested Switchee statement

I am trying to use a nested Switchee statement to display an embedded template but the results are a blank page. Using default status group and EE 2.11.5. I feel like I am missing something basic here....
1
vote
1answer
100 views

Redirect due to “malicious or dangerous” code

All my efforts at "view rendered" are met with "Error: The link you are being redirected to contained some potentially malicious or dangerous code. We recommend you hit the back button and email [my ...
0
votes
1answer
189 views

Category page and Article. How?

EDIT!!! It's not about categories, it's about addresses and templates. I need to get 2 types of pages: site.com/sport/football/ — page with lots of entry site.com/sport/football/realmadrid — page ...
1
vote
2answers
184 views

how do I output am EE html template as a json file [duplicate]

how do I output am EE html template as a json file so it validates? Error:Invalid media type, expecting application/json. I have tried enabling php to my template and adding the following code after ...

1
2 3 4 5
12