7
votes
Accepted
Conditional with variable gives php error
The problem with that is that if {parent_id} doesn't get replaced with a number before the conditional is evaluated, then EE will choke because when converted to PHP it becomes:
if ({parent_id} == 0)...
5
votes
Accepted
Quick and easy way to get category name from ID
Try this free extension from the mighty Low!
http://gotolow.com/addons/low-seg2cat/docs
Working with categories? Then you need Low Seg2Cat. This extension
will give you information about ...
4
votes
Accepted
Conditionals from within Piped String of values
Try this:
{if segment_category_ids_piped ~ '/\b'.cat_id.'\b/'}
Note: this works for pipe-separated IDs (numbers). If you're looking for pipe-separated strings or text, you'd be better off using this:...
4
votes
Accepted
Displaying the number of entries in a category
Yes, this is possible. You can do this by making simple template and embed.
Create one template template_name.html in your template group and insert below code.
{exp:channel:categories channel="...
3
votes
Accepted
Category group and category ID from that group using Low Seg2Cat
There is a setting to restrict to Category Groups in Seg2Cat -- see the documentation. Note that, by default, Seg2Cat has this caveat:
If there are multiple categories with the same url_title, but ...
3
votes
displaying expired entries
To expound on my comment to this answer, and I acknowledge this is a bit unorthodox, this solution will improve performance by only executing one channel entries tag. The query tag will fetch the ...
3
votes
Accepted
GWCode Categories and Stash set/get_list
I think that by caching both lists, you could reduce queries a little bit further. Easier to add Stash caching / Mustash to the mix too.
Something along the lines of:
{!-- set stockists list (...
3
votes
Accepted
category id with if:else statement
This is what you will need to do.
{exp:channel:categories style="linear"}
{if "{category_id}" == "70"}
...
3
votes
Low Search and category keywords
The cause turned out to be the creation (and rebuild) of the indexes not including category information. This build also included Publisher and included an extension to add Publisher support to Low ...
3
votes
Accepted
Using categories with Isotope
Should be pretty straight-forward, though it's really more of a JS question than EE...
In the Isotope callback (ie, after it has finished filtering), you'll need to create a function that fetches all ...
3
votes
Blog categories without having to use Structure?
It's actually easier than with Structure. There's a URL breaking word that you set in Admin->Channel Administration->Global Preferences. By default, it's set to "category", which means that when it ...
3
votes
Accepted
Use backspace parameter on Stash nested get_list
The backspace parameter can be used with {exp:stash:get_list}, however be aware that any trailing whitespace and line breaks will count as 'spaces'.
{!-- Desired output - no trailing comma --}
...
3
votes
Accepted
Viewing a published post in which its status is not open
that is perfectly normal and expected behaviour.
To view content with status completed you need to add that to the "status" parameter in the channel entries tag, like so:
{exp:channel:entries status=...
3
votes
Pagination not working correctly when using categories and Transcribe
You can fix this if you limit the entries outputted to those in the language you are in.
You can do this by adding the 'entry_id' parameter and using a Transcribe tag to output all the entry ids
The ...
3
votes
Escaping characters in category names?
It's always been curious to me that EE doesn't automatically encode entities in category names. But this quick plugin will do the trick for you.
{exp:format_characters}{category_name}{/exp:...
3
votes
Accepted
How do I display entries by Category
The reason the code you grabbed off SE is returning all entries under each category is that you haven't limited the inner loop by the category that the outer loop is currently in. You need to pass ...
3
votes
Accepted
Low Seg2Cat: Category Image filedir is not parsing
That's looking like Low Seg2Cat. Make sure you're on the latest version and the Parse File Paths is turned on in the settings.
3
votes
Accepted
a less expensive way of grouping entries by category
So my experimentation here brought me to Stash.
Much more succinct now and gives me everything I need in just 66 queries before caching :)
{exp:channel:entries dynamic="no" channel="articles"}
{...
3
votes
Accepted
Importing nested categories with Datagrab
From the Developer:
Use a slash ‘/‘ to separate subcategories, so you can do something like, 'Category / SubCategory'
The delimiter is hard-coded but if you want to change it is around line 1420 of ...
3
votes
How to give categories open/closed status?
Custom category field?
Which defaults to open:
Then your template code:
{exp:gwcode_categories channel="example" depth="1" custom_fields="yes" linear="yes"}
{if cat_status == "Open"}{cat_name}{/...
3
votes
Accepted
Using Playa passing values
I have resolved this by adding the option parse="inward" to the {exp:playa:parents} tag. So my code looks like below
{exp:playa:parents channel="article|blogs|calendar_events|contests|podcasts|...
3
votes
Accepted
How to get entry's categories, of a specific Category Group
You can specify which group the categories tag looks at.
{categories show_group="2"}
https://docs.expressionengine.com/v2/add-ons/channel/channel_entries.html#show-group
3
votes
Accepted
Display Parent Category
Yes of course, you should use GW Code Categories.
After installing that plugin, please try below code. I think it will work to get parent category.
{exp:channel:entries channel="channel_name" disable=...
3
votes
Accepted
File directory doesn't parse correctly in Seg2Cat
File paths are only parsed in the Category Image field, not in the Category Description field, and only if the Parse File Paths setting is set to Yes.
2
votes
Accepted
Using categories tag pair with related categories mode
yes {categories} loop not working with related_categories_mode.
you can work around this problem using {embed} template and pass the entry_id to it then call {categories} loop.
or you can use addons ...
2
votes
Outputting categories as checkboxes - exp:channel:form / safecracker
I am agree wiht Jammooka u must use name="category[]" as u can see in the document here:
http://www.ellislab.com/expressionengine/user-guide/add-ons/channel/channel_form/index.html#categories
but in ...
2
votes
Accepted
Playa // Entries // Category Archive?
Each related product could have individual category relationships, right? So If I understand you correctly, you want the aggregate of all categories assigned to the related entries.
You can do that ...
2
votes
Category Filter for Google Map Search
We're using checkboxes for the categories, but I'm assuming it's similar...
In the search form:
{categories show="1|2|3|4" limit="4"}
<div class="checkbox">
<label><input ...
2
votes
Categories of a category_group won’t show
You need to specify the channel parameter, and you can leave out dynamic="no" because that's not a parameter for this tag.
If specifying the channel parameter does not work,try adding the following ...
2
votes
how to get parent URLs belonging to it's child categories?
GW Code Categories is pretty much my goto addon for anything to do with manipulating category output. It has useful parameters & variables for this type of stuff: {complete_path} & {...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
categories × 552channel-entries × 78
gwcode-categories × 41
templates × 27
conditionals × 27
category-group × 24
ee2 × 23
relationships × 21
stash × 20
playa × 20
channel × 19
safecracker × 18
filter × 18
low-seg2cat × 18
search × 15
url × 15
segments × 15
structure × 14
child-categories × 14
low-search × 13
ee3 × 11
query × 11
entries × 10
solspace × 9
pagination × 8