Questions tagged [sections]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
14
votes
1answer
3k views

Is it possible to exclude multiple sections from an entry search query?

I'm trying to build a search function that excludes results from certain sections all together. This is the code I was trying to use. {% set entries = craft.entries.search(query).section('not ...
12
votes
1answer
2k views

Changed section from Channel to Structure, but can't re-order entries

As the title says, I changed a section from Channel to Structure, but when clicking on that section in the dashboard, the layout still looks like a Channel, and I'm not able to reorder/drag the ...
13
votes
1answer
10k views

Get the current section handle

I can't help but think this is a silly/obvious question, but I'm trying to retrieve the current section handle so I can use it as a class. Maybe I'm going about it wrong, but {{ handle }} does ...
11
votes
1answer
2k views

How to create a CMS editable channel section index page?

If I have a section called 'blog', and its handle is 'blog', and it's a Channel, all of the entries appear under http://mysite.com/blog/{slug} - which is great; but how would I create a page at mysite....
3
votes
1answer
502 views

Linking to channel via structure section

I apologize for opening up a whole new question for this topic since it's been discussed a few times now, however I don't have enough rep yet to comment on the existing questions. Regarding the ...
3
votes
1answer
1k views

How do I sort a collection of entries from multiple sections by date?

I want to create a featured story slider on my website and gather the latest entries from multiple channels to populate it. Here is what is working: # fetch the entries {% set featuredBlog = craft....
12
votes
1answer
2k views

Move entries between sections

I have some entries that I'd like to move to a different channel, but I don't see any way to do this. Is it possible?
4
votes
1answer
3k views

Loading javascript on specific sections/pages

What is the recommended way to add section specific javascript to entry pages? I need to make some 3rd party api calls front end for currency conversion but I want to only use it on a specific ...
1
vote
1answer
2k views

Modelling flexible content sections and recommendations

A little background first; I'm coming from WordPress, along with the Advanced custom fields (ACF) plugin, so my thinking behind this may not be the best way in Craft. In ACF I usually set up a field ...
5
votes
1answer
880 views

Output URL to section

Is it possible to output the path to a given section? I'm using this to define the section model for the contact page (a single): {% set contactPage = craft.entries.section('contact') %} But then, ...
2
votes
1answer
233 views

Is there simpler, less assuming Craft documentation?

I'm really struggling with understanding how Craft works at the moment. I've been started mid-way on a particular project and I just can't get my head around how Craft works. Their documentation ...
4
votes
2answers
512 views

Can I use translated properties for URL formats

Here's my scenario. I have a structure section: "events". Within that I have three entry types: "events", "exhibitions", "specials". I would like the events to follow the following URL structure: {...
4
votes
2answers
593 views

Structure(s) vs. Categories for product catalog

So I am working on a project that includes an online product catalog. Is there a recommended way of setting up a catalog regarding the use of structure(s) vs. categories or a combination both? I ...
3
votes
2answers
2k views

How do you page through child entries in a structure?

I am trying to figure out how to page through only the children of the top level section entry being displayed, I have looked at this question but as I say I am after only the children not the ...
1
vote
1answer
735 views

Resaving blog entries keeps failing

Recently changed the URL format for a section. Now I have a red circle in the upper right and an error message of "resaving blog entries - failed". Trying again results in same error. Any ideas what ...