Questions tagged [sections]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
181 views

How to use the same category group as a filter on multiple channel sections?

I have two channel sections, each with only their own entry types. I've added the same category group field to both. I'd like to filter each channel's list of entries by the same category group. So ...
1
vote
2answers
299 views

Get Entries From Any Section Matching a URL segment

I have 2 issues that I need help with: I want to load ENTRIES from any section where the first URL segment of the entry matches jobs. I am using the code below to load any SECTION where the first URL ...
0
votes
1answer
324 views

Removing index.php strange issue

I already had this question posted but I didn't include enough relevant information so I deleted it and here I go again... I have a weird issue currently on my Craft setup. I have removed index.php ...
1
vote
3answers
407 views

Update fields structure from local to production

How can I change fields/sections structure locally while having a live site and then upload the new structure, without wiping the production site? In Wordpress ACF you can just Sync the fields ...
2
votes
2answers
747 views

How should an index page be setup/defined in Craft?

Site construct question... I have categories. Craft knows where to find the template for a category - i.e. markets/{slug}. But I also have a Markets (categories) page with the first 6 entries ...
2
votes
1answer
28 views

Is it possible to limit the number of times a user can be added to the same field across different entries?

I want to make it so that each user can only be assigned once to a specific field across all entries. For instance, let's say we have a bunch of teams. A user can only be on one team at a time. Once ...
1
vote
1answer
38 views

How to make a code/settings for accessing the one database from 2 different html files with {slug}

I create a code for TV show database, but I have a big problem. Please see the image I want to access one entry(post) with some data from some templates. But I don't know how to create any code or ...
1
vote
1answer
437 views

Count table field values in certain section

I would like to know, how many values are saved in the table field called "artikelnummer" with the field name "artikel". The section is called "bikes". I tried: {% set entries = craft.entries.section(...
1
vote
1answer
346 views

Get next entry from an entries field

I am having the following sections: 1. work (section type: single) fields: - workList (type: entries from section type workArticles) 2. workArticles (section type: channel) fields: - ...
0
votes
1answer
407 views

Link to an entry to a related section

I have a section called reviews and a section called games. A entry field in games is creating a relationship to reviews. On my _entry.html entry for reviews, I want to link back to the related game. ...
0
votes
2answers
326 views

Loop through related section's entries

I have two sections: games publishers For example, a games entry title would be "Mario Brothers" and a publishers entry title would be "Nintendo" On the entry page for Nintendo, I want to display ...
1
vote
1answer
732 views

Display field from one section in another section

I have two sections: Games Publishers Games has a field called "GamesPublisher" that is a relation (field type "Entries"), the Source is "Publishers". In my template to show an entry from games, I ...
1
vote
1answer
98 views

404s on custom sections and entries

I have created a section called "Services" and an entry within called "seo". When I click to view that entry in the admin area, it takes me to domain.com/services/seo, as expected, but that 404s. Is ...
2
votes
1answer
603 views

Order/sort a structure section by date too?

Is it possible to have a Structure section ordered by date (desc) as a default and then take the custom ordering in the CP into account?
1
vote
1answer
209 views

Many sections use one template: How do I get current section?

I have multiple sections (channels) that use the same index and _entry templates. In my index template, given that the section is dynamic, how do I define the current section and access it? Eg, I'd ...
0
votes
1answer
51 views

I can't get the first image to show on the homepage

I'm sure this is a simple question, but I'm a newbie in this, so I'd greatly appreciate all the help I can get! :) The site is carstensphotos.lumenage.com for now. It's a one page site, so I used the ...
1
vote
1answer
81 views

getAllSections but not these specific sections

I'm looping over my sections to produce a section filter group. But I want to exclude at least 2 of the sections. I'd have thought I could do craft.sections.getAllSections('not 18') for example but ...
1
vote
1answer
334 views

What's the best way to build URLs for dynamic content collections?

I'm working on a project where we need to post publication Editions, each containing any number of Stories, of which there can be one of three entry types. The URL structure we're shooting for is foo....
0
votes
1answer
534 views

Resaving Events Entries failed

This question is identical to Resaving blog entries keeps failing except that I'm not finding any [error] or [warning] in my log entries. I have changed my entry URL format for the section named ...
0
votes
1answer
146 views

Adding section in breadcrumbs

My Entry URL Format looks like this: {section}/{slug} and I am using the standard breadcrumbs code; {% if entry.level > 1 %} <ul class="crumbs"> {% for crumb in entry....
0
votes
1answer
754 views

Search in section only

How would I enable search in a single section only? I want my search results template to be used regardless of which search option is used. Ideally I'm looking to pass another value from my search ...
1
vote
1answer
107 views

Can someone help me with my site structure? Sections/Category setup

Thank you for your time and patience I'm a newbie to the Craft world. I've been all over the Craft Documentation and this site trying to figure out the best approach for a site I am putting together. ...
2
votes
1answer
230 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 ...
1
vote
1answer
144 views

Find related entries from section entry Matrix entry field

In my projects section, each project entry has a Entry field in a Matrix. The Entry field references a tool. On the tool entry page I am trying to display all the projects that use that tool in their ...
1
vote
1answer
139 views

Can't open new single section

I created a new Single section and named it "test", added some content and tried to view it on domain.com/test. Unfortunately I get my default server 404 and not the new single section. I tried to ...
1
vote
1answer
366 views

Current Section handle

I want to build a subnav with all entries from the current Section. {% set pages = craft.entries.section(getCurrentSection).level(1) %} I'm looking for the handle "getCurrentSection". I will use ...
1
vote
0answers
26 views

Preserve Structure while searching for entries?

I have Structure type section and each of the entry contain at least 10 level 1 entries. Is there a way to preserve the structure of the entries while filtering/searching entries? What I mean by this ...
2
votes
1answer
522 views

Get structure url

I have a structure set up like: What we do (set as a structure) 2nd level page A * 3rd level page A * 3rd level page A 2nd level page B * 3rd level page B I'm setting up breadcrumbs for this so ...
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 ...
5
votes
1answer
706 views

Using multiple sections VS a single section with entry types

I'm just planning ahead for a project and was hoping for a second opinion. I'm going to be making a site that will have about 7 different types of entry - all of which have different fields/URL's; ...
0
votes
1answer
110 views

Craft User Permissions in subsites

I'm still new to CraftCMS and still learning about site structure. The site that I am asking about below is not (yet?) in CraftCMS: Our site is composed of many subsites which have different users ...
1
vote
1answer
189 views

Linking to Sections: do it or do something different?

I'm pretty new to Craft, so I'd like to know if there's a best practice when linking to a section, assuming the section has an index.html template for its "homepage." I'm currently using the ...
5
votes
2answers
546 views

A Structure section with an entry to a channel index

I don't have commenting privileges yet, so couldn't comment on either of these posts (here and here) regarding an entry in a Structure section that links to a Channel index. Between the two posts ...
2
votes
2answers
669 views

Linking to channel page

I'm just getting started with Craft. My problem is that I'd like the user to be able to change the location of call to action buttons on the site. Instead of allowing them to enter any URL, it would ...
3
votes
1answer
363 views

How can you check if a field exists in a section, not by entry?

For a plugin, I need to check if a certain field exists in a section. How can i manage that? I'm using the settings section from the plugin, looping through all sections by craft()->sections->...
0
votes
1answer
55 views

Renaming news section leads to 404

I'm pretty new to Craft, just installed my first one. I've checked the docs, but I couldn't find any useful hints anymore and I think it should work. I'm trying to rename the default news section to ...
1
vote
2answers
983 views

Parent/child Single sections

I'm trying to create parent/child Single sections without using Structures. So in other words, create a Single section and assign it a parent Single section. Is this possible?
0
votes
1answer
141 views

Storage advise for product catalog

I am going to build a boat catalog. Boat products x 40 Types of product x 3 Suppliers of products I was wondering what the best storage setup? For boat and suppliers these could be entries and ...
1
vote
0answers
253 views

How do I use the section Entry URL format for registerSiteRoutes() in a plugin?

I'm trying to register a site route in my plugin based on the Entry URL format for a section chosen in the plugin settings. So if it's the default news section in the Craft install the URL format ...
3
votes
1answer
317 views

Best way to find sectionId by slug

What would be the best way of finding a sectionId by its slug within my plugin?
1
vote
1answer
218 views

Nest Entries from Different Sections

I have 2 separate sections living in the same place on my site. Example: About (Single-type Section) Team (Structure-type Section) So in the URL I need to nest Team underneath About, i.e. /about/...
2
votes
1answer
411 views

Using a macro for entries loop

I'm trying to use a macro to output a list of entries (and the title of a section), this is my code: {% macro sections(sectionName)%} {% set index = craft.entries.section('{{ sectionName }}Index'...
0
votes
2answers
440 views

Multiple Sections Within a Structure Group?

My site has a set of different layout types with their own templates: Brochure Listing Plain Text And the site has a group of hierarchical pages that each use a different layout: About (Brochure ...
3
votes
1answer
991 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....
2
votes
1answer
66 views

Show a partial list of sections

I would like to selectively show a subset of my sections in the main navigation. Is it possible to do something like this? {% set sections = craft.sections.getSectionById(1,2,3) %} {% for section in ...
3
votes
1answer
75 views

Section/category setup input

Looking for some input on how to setup a Craft site. I have 2 sections of the site containing content grouped by the same set of topics (or categories). For example, within Services there 6 sub-...
0
votes
0answers
75 views

How to create a plugin which will update a field in a section when an entry is saved

I am looking to create a plugin which will update a field in a section when I save an entry. I will be getting the length of an MP3 file (using FFMPEG) I upload via assets and output the time to ...
1
vote
2answers
971 views

Only display entries based on a field conditional

Hey I am trying to get 4 entries, but only want 4 that have a body length > 100. How would I accomplish this? {% for entry in craft.entries.section('artists').order('RAND()').limit(4) %} // only ...
2
votes
1answer
288 views

What are the consequences of choosing structures over channels?

I want to build an international directory of fishing port centres in Craft. Each port will have the same custom fields and be geocoded. The documentation here just doesn't make clear the ...
4
votes
1answer
132 views

Section Single Title Caching

I have the following - {% set press = craft.entries.section('press').first() %} {{ press.title }} If I change the section title in the Sections area of the back end from something like "Press" to "...