1

I've got a product section on a website where individual product entries are categorised. On the section landing page all the products are listed organised by category. On the individual category pages only the product entries relevant to that category are shown.

The issue I’m having is that for the category landing page I want to pull in the Section landing page content. However when I try the following:

{% set entry = craft.entries.section(‘productsAndMarketsLandingPage’).first() %}

{entry} returns empty. Any thoughts why this isn’t being pulled into this particular page/template? I can access it just fine from within the

The section, template and URL structure is as follows:

Section landing page
url: /products-and-markets
template: /products-and-markets/index
section: productsAndMarketsLandingPage

Category landing page
url: /products-and-markets/{slug}
template: /products-and-markets/_category
section: productsAndMarkets

Product entry page
url: /products-and-markets/{slug}
template: /products-and-markets/_entry
section: productsAndMarkets

Cheers in advance,

Cole

1

Okay, solved.

Was an idiot and wasn't using the right tag to output the results of the query.

Sorry and thanks!

| improve this answer | |
  • Glad you got it sorted out, Cole! Can you choose this as the answer so the question will be closed? – Aaron Berkowitz Sep 24 '15 at 13:10
  • Can you post the tag you used to get things working for folks finding this post in the future? – Anna_MediaGirl Sep 24 '15 at 16:50
0

How about

{% set entry = craft.entries.sectionId(productsAndMarketsLandingPage.id).first() %}

| improve this answer | |
  • Sadly still returning empty. We are using locales on the site (with English defaulting to root) - not sure if that is what is causing the problems – Cole Henley Sep 24 '15 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.