Questions tagged [templates]

Questions related to the ExpressionEngine "templating" system.

Filter by
Sorted by
Tagged with
17
votes
4answers
2k views

What does "Enable Strict URLs" really mean?

What does "Enable Strict URLs" really mean and are there any security/other implications if I choose to not use strict URLs?
12
votes
11answers
7k views

How to make templates output JSON?

I am trying to use EE templates the same way I use CI controllers. Normally, when I need an "API" wherein my JS can call a URL (maybe with some POST variables) and get a JSON (or JSONP) response back, ...
2
votes
2answers
1k views

How to create front end AJAX handler which validates and adds comment to content?

I am attempting to create a "Leave Comment" form which is loaded by AJAX on demand and then shown using a jQuery popup. There are three motivations for this: Less clutter on page. Reduced automated ...
6
votes
8answers
2k views

How to use a common template for all pages?

Is it possible to define some container template that might contain my <html> declaration, then inside it it'll just embed other templates depending on the page? Right now, I'm having to declare ...
5
votes
4answers
763 views

EE Code within channel entries

Is it at all possible to have a text input or area field in which we could enter EE code to be processed by the template. For example, if we could have a text area called "Advanced Functionality" and ...
4
votes
3answers
2k views

Channel Entries - possible to search relationship field?

I need a list of all entries filtered by a relationship field. I thought I might be able to use the search parameter: http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries....
2
votes
2answers
146 views

Cross-Referenced Relationships

While I wait for Playa to be approved for use in my project, I've put together this structure to enable cross-referencing: 3 Channels: products all_colors product_colors The all_colors channel just ...
17
votes
3answers
385 views

What is the best way to handle a matrix field in Stash

I have the following code in a template that I use to prepare the data for an embedded template using the Stash partials approach. It is for a single entry page that draws data from an entry that can ...
15
votes
2answers
3k views

What is the difference between a global variable, a snippet and an embedded template?

What is the difference between a global variable, a snippet and an embedded template? When and where should I be using each of them?
6
votes
1answer
10k views

How to Display an Entry's Category?

I'm on a single product entry page. The URL does not specify the category. In fact, the entry has 3 category groups associated with it. I want to display the first category assigned from each of the ...
3
votes
3answers
1k views

Is there a standard way to do 404 pages with structure?

Is there a standard way to do 404 pages with structure? Many thanks! Ben
5
votes
4answers
551 views

Trigger a 404 on a /news index which has categories and pagination running through it

I've yet to come up with a decent solution for this so thought I'd throw this out there. Basically I have a /news/index template, it serves the initial set of news results, and also serves up ...
4
votes
5answers
1k views

displaying expired entries

Is there a way where i can create a function that only displays expired entries? I have a page set up that displays, up and coming and pervious events click here when the user clicks on the pervious ...
3
votes
3answers
736 views

Formatting a CSV using Channel Entries

I'm trying to export a CSV of my members using Solspace User. It works fine, except that when I open the CSV in Excel, it actually shows the quotes around the values. I know that obviously my ...
3
votes
1answer
161 views

How can I create a category listing which has its own template?

Use custom category listing template 'news/category': /site/news/category Use custom template to present “Legal Politics” 'news/category-legal-politics' entries: /site/news/category/politics/legal ...
3
votes
2answers
485 views

Relationship tag: link to different channels

I have a relationship field which allows the editor to choose entries from different channels (channels about & news), and a few channels I have set up for Pages (with a Page URI). How can I make ...
3
votes
2answers
1k views

Unformatted Field Data Wrapped in <p> Tags on Output

I have a text field with formatting set to "none". In the database, the data for that field is stored exactly as it should be: as plain text with no html tags. When I drop the field tag into my ...
3
votes
4answers
875 views

How can I get the template name in the template?

I am trying to pass the template name in my tag and wanted to do something like this: <html id="template-{template_name}"> Any idea how to get the name of the template? Thinking aloud it'd be ...
2
votes
1answer
595 views

Template Routes and extra segments

I often use a 'site' template group to house my base level pages. For example I may have a 'about' page, but don't require an 'about' template group so I add this to the 'site' group. I then don't ...
7
votes
1answer
528 views

Benefit of Saving Templates as Files

Aside from being able to edit files without the Template Manager – is there any advantage to saving templates as files in ExpressionEngine? Does it improve performance, security, etc.? Would be ...
5
votes
3answers
713 views

Turn off Message Pages after login?

Is there any way to 'turn off' the Message pages that briefly show after a login, logout, etc.?
3
votes
1answer
234 views

Does {name} always equal {username} in Forgotten Password template?

Does the name variable in the forgot password email template always equal the username?
3
votes
1answer
419 views

Are there limitations to ExpressionEngine's JavaScript templates?

I recently upgraded a couple of sites to EE2.5.5. I was utilizing templates to store JQuery and its plugins, combining all within an index file of my 'scripts' group. This isn't necessarily best ...
3
votes
1answer
99 views

Uneven category depths template

I have a site where there is an uneven depth of categories for a product channel. Previously I've cobbled together a band-aid solution but I'm reaching out to see if there is a better way. I have a ...
3
votes
1answer
168 views

UPDATE Content Elements and issues with unserialize()

Update The issue seems to be an unserialize() error. I wasn't getting notified before because CE suppresses error reporting on unserialize in various places in ft.content_elements.php. I'm going to ...
3
votes
1answer
828 views

Looping Through All Channel Fields?

I want to display most of my Channel fields in a table (with some exceptions). Is there a way to loop through the Channel fields and display their labels and field values? Keep in mind that some ...
2
votes
1answer
249 views

Assets 2 on MSM: Tags have no output on second site

I'm branching this off of another question: Assets 2 MSM Cannot Upload or view images I'm not seeing any tag output from Assets in the second site. I'm running EE 2.5.5 with Assets 2.0.5. This is a ...
1
vote
1answer
884 views

Stash embeds: struggling to parse tags

I have a chain of embeds in Stash: A "main" template that embeds {stash:embed name="foo:.index"} foo:.index has 1 line of code: {stash:embed name="common:.serp" stash:group_id="6" stash:channel_name="...
1
vote
1answer
757 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 ...
1
vote
5answers
733 views

Custom variable within tag pair?

I need to restructure the channel entries (I'm trying to group them by one of the channel fields). For example, say I have a list of fruits and each fruit had a color. I'm trying to group these fruits ...
1
vote
2answers
616 views

Stashing a structure variable and using it as a channel parameter

Here's the code i'm essentially trying to achieve {exp:stash:set="page_content"} {exp:channel:entries channel="photos" dynamaic="off" entry_id="{structure:child_ids_for:1}"} {!-- My Code -...
1
vote
1answer
1k views

Grab logged_in user info in PHP template and assign variables

can you help me writing this lines of code for grab in a EE template the information about a logged_in user, using php. I'm using Vanilla Forum, and i want to use the JsConnect to pass the logged_in ...
1
vote
1answer
858 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
1answer
57 views

Fatal Error Message in EE CP when I want to open a template pr submit changes to a template

Sorry very new to EE. What do I do to sort out the following error Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 49 bytes) in /home/content/94/9617594/html/control/...
0
votes
1answer
2k views

My template files are not in system > expressionengine > templates. How can I figure out where they are?

My template files are not in system > expressionengine > templates. There's only a single index.html file in that folder. I visited Design ‣ Templates ‣ Global Preferences. Basepath to Template File ...