7

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) Either this {if parent_id != 0} Or this {if "{parent_id}" != "0"} Is more fault tolerant when the variable doesn't exist. But, you may wonder, why is ...


3

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 (consider caching with bundles and mustash forever) --} {exp:stash:set_list name="stockists" parse_tags="yes" parse_conditionals="yes" save="yes" ...


3

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}{/if} {/exp:gwcode_categories} Note the additional parameter custom_fields="yes".


2

Top of my head, its a parse order thing. Try wrapping your exp:categories tag with {exp:stash:parse process='end'}{exp:categories}...{/exp;categories}{/exp:stash:parse}


2

Could you send your related code to help you with the GWCode Categories problem? Are you using only ? {exp:gwcode_categories}{/exp:gwcode_categories} Only using this code will not display nothing. You have to put parameter and code inside to achieve your wish. <ul> {exp:gwcode_categories entry_id="19" style="linear"} <li>{cat_name}</...


1

Looping through categories and outputting entries within is an inherently "expensive" process. Someone will likely pipe in here with an answer that uses Stash to optimize this, but I'd suggest two options: Use CE Cache to cache this area of your template. Use NSM Categories to output your entries grouped by category.


1

I may be missing something here but this seems really straightforward. The following EE code would display all entries in the myexamplecategory category: {exp:channel:entries channel="walks" disable="member_data|category_fields" show_expired="yes" paginate="bottom" limit="12"} <h2><a href="{title_permalink='walks/view'}">{title}</a>&...


1

As I mentioned on Twitter you should not need the Solpace tags to render your search form, according to the docs. The fact that your form does not work without them might point to another issue which you should explore with Solspace. Nevertheless, if you want to investigate the cache escaping, please make sure you are using the latest version of Stash and ...


1

Did you enable the entry_count parameter? {exp:gwcode_catmenu style="linear" cat_id="5" active_branch_only="yes" entry_count="yes" show_empty="no" } {if cat_id != 5} <li><a href="{path='home/products_grid/category/{cat_url_title}'}">{cat_name}</a></li> {/if} {/exp:gwcode_catmenu}


1

Not familiar with that plugin but you can try… IF you're calling the {exp:channel:entries} tag, you could simply place it inside that tag and it'll work fine. If you need to have it outside the {exp:channel:entries} tag you could use Stash to record it like: {exp:stash:set name="catid" parse_tags="yes" type="snippet" trim="yes"} {!-- Save as snippet --} {...


1

The problem with your second block of code is that the option values for the category select field is a URL, when it should be category data, such as a category_id, category_url_title or category_name. Let's say your first search with the first dropdown sends you to http://mysite.com/event/results/search&category=sports On this result page, you can ...


1

Shouldn't need an addon here. Try this approach: {exp:channel:entries channel="hprod"} <img src="{h_img}" /> <h3>{title}</h3> {categories} <h4><a href="{path='product-range/hair'}">{category_name}</h4> {/categories} {h_desc} {/exp:channel:entries} I've a tutorial on working with EE categories on Train-ee:...


1

Solved <a href="{site_url}Products/detail/{exp:gwcode_categories entry_id="{entry_id}" style="linear" backspace="1" depth="1|2"}{cat_url_title}/{/exp:gwcode_categories}/{url_title}">Details &raquo;</a>


1

What about just using the related_categories_mode="" parameter on the channel:entries tag?


1

Add parse="inward" to the gwcode categories parameters.


1

I just found the solution by using this free addon called Low Seg2Cat which just lets me get the category_id of the current uri and pass that along with the initial channel:entries loop. Like this: {exp:channel:entries channel="mychannel" category="{last_segment_category_id}" dynamic="no"} I spent hours making that embedded template thing to work. And now ...


1

Looks like you need the GW CatMenu add-on; class_current isn't listed in the docs for GW Categories.


1

It doesn't look like GWcode CatMenu currently supports calling alternate versions of category images, but you could do this in a really quick plugin pretty easily. Your key function would look something like this: function get_size() { $image = ee()->TMPL->fetch_param('image'); $size = ee()->TMPL->fetch_param('size'); $pos = strrpos($...


1

Not quite sure from the comments above if all your 'parents' are on 1 level or not but perhaps this will help <li class="submenu-parent"> <a href="#">Product Type</a> <div class="submenu cf" id="submenu-1"> {exp:gwcode_categories channel="products" style="linear" depth="1"} <h3>{cat_name}</h3> {/exp:...


Only top voted, non community-wiki answers of a minimum length are eligible