Questions tagged [sections]
The sections tag has no usage guidance.
174
questions
1
vote
1
answer
43
views
How do i remove versions from a section after changing section settings to not store versions?
I have a section that i have changed from versioning to switching git off as I do not need them. I have also changed a field adding it as searchable.
In order to reindex search field i tried CLI ...
0
votes
1
answer
21
views
Get the localized handle and slug for "current" section for constructing breadcrumbs
I'm trying to contruct breadcrumbs for entries under a specific section. This feels like such a "how-hard-could-it-possibly-be" type of question, but I've been at this for a lot more time ...
1
vote
0
answers
31
views
CMS pages have become duplicated?
I have overtaken a project and noticed that the pages section of the CMS shows duplications.
I have not come up against this before and was wondering if anyone has any suggestions to stop two of them ...
1
vote
1
answer
61
views
nesting functionality missing in section type structure after feed-me import
i create an new section from type structure.
when i manually add the entries and nest it everything works as aspected.
after importing my entries with feed-me and the option create parents if not ...
1
vote
1
answer
59
views
nested sections
how can i achieve the following result?
i have a structured section called products like /hardware/apple/iPhone which gets the template /templates/productpage.twig
now i need need to load a different ...
1
vote
1
answer
46
views
Remove expiration date field from section / entry type
By default, every entry has an expiration date field allowing the editor to expire an entry. I'm currently working on an application with some sections where expiring an entry doesn't make much sense ...
1
vote
1
answer
86
views
How do you save custom fields on an EntryFixture?
I can't for the life of me figure out how to setup EntryFixtures in craft to populate with custom fields. I'm using the project config which already has the sections and fields defined in my tests. I'...
1
vote
2
answers
56
views
Specify a specific entry type in paramaters
I am currently searching within multiple sections on my site.
I'd like to limit one of the sections (courses) to a specific entry type (cce)?
Any help would be greatly appreciated!
{% set params = {
...
1
vote
1
answer
65
views
URI with multiple URL formats (after slug)
Is it possible to have a URI like this: /artist/{slug}/news
to create an overview of all news articles of this particular artist?
I tried to set it up with Routes and with a section Entry URI, but I ...
1
vote
1
answer
217
views
Retrieve section slug by handle
I want to be able to get the slug of my news section dynamically by searching for its handle.
Slugs tend to change during the development phase, but the handle doesn't. That's why I want to hard code ...
1
vote
2
answers
116
views
How to display multiple entry loops on the homepage (Single section type)
I've been learning Craft 3 for a couple weeks and I've run into a little snag. I have a homepage that I would like to display multiple entry loops and/or types. However, I cannot find how to do this ...
0
votes
0
answers
153
views
How to allow multiple entries to have the same slug?
Users create an account and their profile (domain.com/userName) is a template pulling info from craft users.
Each user can create entries, all stored in a Structure section (domain.com/userName/...
1
vote
1
answer
757
views
Calling unknown method: craft\models\Section::hasUrls() - Craft 3 upgrade
I am migrating a site from Craft 2 - Craft 3. In my sitemap template I have the following code;
{% for section in craft.sections.getAllSections() %}
{# We only care about sections that have URLs #}
...
1
vote
2
answers
79
views
How to build a web page using different sections created in Craft
I am a beginner in Craft. I have a Craft website. There is an HTML design with me. From admin, I divided the HTML into sections and created entries based on that. All the coding related to each ...
1
vote
1
answer
145
views
Can I use Craft CMS as a PIM system?
Does it make sense to use Craft CMS as a Product Information Management system?
I have already used Craft 3 for a couple of sites, and I understand part of its capabilities. I was a bit puzzled ...
1
vote
1
answer
167
views
Where/how to add a page title to a section (listing)
I have a number of pages/sections (listings) in either channels or structures. Each page/section (listing) will have a heading that displays an editable title of each page/section.
Should I be able ...
1
vote
1
answer
33
views
Merge a structure and a single section
That is written so inefficently:
{% set indexNavi = craft.entries.section('pageContent').level(1).all() %}
{% set bookingLink = craft.entries.section('booking').all() %}
<ul class="navList">
...
1
vote
1
answer
39
views
Edit the create new section page [closed]
When creating sections, I need a way to toggle all of them off or on. I have 188 sites and you can imagine how big of a pain it is to untoggle one by one.
Am I able to do this somehow? Create a ...
1
vote
1
answer
353
views
How to manage multiple categories and entry url formats
I have a setup in Craft 2 like below:
Section: products
Url format: flowers/{productCategory.last.uri}/{slug}
Categories:
cat1 = Bouquets
cat2 = Valentines days
Url format: flowers/{slug}
The ...
1
vote
2
answers
234
views
Multiple authors for an entry
The website I'm currently working on is a plattform where several 'subgroups' can post events but also have their own subpage. So the two affected secrions are 'event' and 'subgroup'.
Currently, every ...
1
vote
1
answer
45
views
Using language specific variables inside section URL settings
When i use some kind of variable in url settings of section, it always uses default language version of this variable.
For example, blog has two languages, english (default) and german. If i use ...
1
vote
1
answer
762
views
How do I get different URL Format with parent/child structures & how do I display different templates?
I need to create a features structure section for a website that will have parent features and child features.
Q1: How do I get different URL Format for parent & child pages?
I need the parent ...
1
vote
1
answer
215
views
Fixing deprecated code, relatedTo issue
Working on fixing a lot of deprecated code, enviroment is setup as dev so getting a lot of warnings. Some are easily idetified, others are pretty generic and come from core files. Doesn't show where ...
1
vote
1
answer
1k
views
How can I list Entry Types of a single Section?
The following outputs all sections and their entry types, but I'm struggling to work out how I output only the entry types from the "blog" section.
{% for section in craft.app.sections.allSections() %...
1
vote
3
answers
977
views
Craft templates in sub directory
We want to add a little more structure to our templates directory by adding folders to group templates files.
For example:
templates
--_macros
--_views
--_layouts
In general this works fine but we ...
1
vote
2
answers
169
views
A-Z Separate Pages
I've built a page listing all entries by Character 0-9/A-Z. But unfortunately it's extremely slow loading due to the amount of entries the site has. I'm wondering if I can break out the letters into ...
2
votes
1
answer
79
views
Section and template folder problem
I hope anyone can help me to get started. I think I have a brain freeze or something.
I have created a section (structure) that is called "House".
I want this section to use a template. In craft/...
2
votes
1
answer
561
views
Targeting the first entry item
I'm using Craft 3 and have created a section (channel type) for my project entries. At the bottom of each project page I have my Prev and Next Project buttons. How do I target the first and last ...
1
vote
1
answer
50
views
How should I organize/structure my channel sections?
To me, I have a large dataset of 2,000 - 2,400 entries. It's a static dataset. I only need to update a few fields annually.
I plan to use channels. But, how should I organize the channels?
...
1
vote
1
answer
757
views
Get Entries from a specific Entry Type
I'm trying to get all Entries that are from a specific Entry Type.
My Section is "Site".
Which has 3 different Entry Types.
Now I want to get all Entries from the Entry Type "Program".
I'm trying ...
1
vote
1
answer
205
views
Element Type: Edit Page fields
I'm currently working on creating a full-sized Edit Page for my own Element Type.
I created a elementSelectField and wanted to know if you guys have some advise or good articles to read on that ...
1
vote
0
answers
30
views
Multi-language, how Craft determines the CopyFrom after adding website and Section
The question is admin (backend only), not Twig :
Where to Manage "copy from" site when adding new website and add section to this website. The "Copyfrom" takes place in the background after ...
1
vote
0
answers
24
views
Section permissions are ignored when linking to an entry
Users with permissions to limited sections can still “link to an entry” in any section from within the WYSIWYG (Redactor) editor. I'm using Craft 2 with a Rich Text (Redactor) field.
Is this a bug ...
0
votes
0
answers
324
views
Get Entries from Section related to a category
I'm currently trying to get all entries which belong to a section which is related to that category. e.g.
Category
Brand
Offer
Offer belongs to a brand.
Brand has a category field.
{% set ...
1
vote
1
answer
31
views
Can user group permissions be used to override entry section locale settings?
I have created a localized site with 9 locales for a client in craft v2.6. They are now requesting us to create a user group for each locale so they can assign editors for each of those regions. When ...
0
votes
1
answer
165
views
How can I use two different templates for a single entry?
I'm building a coursework site and have a Course section, who's entries will be courses containing work that the client will assign to users. I built in both the work itself (different "lessons" ...
1
vote
2
answers
359
views
Craft CMS - Dynamic Order Field Layout In Sections
I'm wanting to have the order of my elements within a template dynamic so that the user whilst in a template of page can reorder the modules as they please.
See screenshot for example
Within the ...
1
vote
1
answer
336
views
Entry within multiple sections
I'm trying to work out if the following is possible in Craft.
Assuming I have a single entry, I want to theoretically tag it as a 'blog' and 'about', both of which are sections
I want to then have ...
1
vote
1
answer
707
views
Get the section name based on a url segment
I'd like to retrieve the name of a section based on a url segment. Normally I would use {{entry.section.name}}, but this doesn't work, since there is no entry available.
I've got this working:
{% ...
1
vote
1
answer
99
views
best approach to call entries from two different sections
I have set up two sections for two different kinds of events. On one page I want to differentiate between them on the other page I want to list them all. How do I organise that best on the back end ...
1
vote
1
answer
45
views
In a large set of entries across multiple sections, how can I loop through each section type in the set?
I have a set of entries from multiple channels and I want to loop through each section type that is in the set.
Something like
{% set entries = craft.entries.search(query).order('score') %}
{% for ...
1
vote
1
answer
360
views
Translate Section name
I can see in the CP (craft 3) that my sections have a 'translatable' icon but I don't find anywhere in the UI to translate section names.
What's the best way to translate these?
2
votes
1
answer
257
views
First Craft website: how to organize different content
I am new to Craft and read a lot of arctilces and most of the docs. Most parts are quite easy. Now I plan how to organize all the different parts and pages.
Below is a simple outline. Not every page,...
2
votes
2
answers
138
views
List most recent items combined from Channel and Structure sections
If we pass through an array of Channels & Structure sections we find that Channels entries tend to be listed first. So the first 15 will comprise of ChannelOne and ChannelTwo and then start ...
1
vote
1
answer
613
views
How to get fields from another section?
I need to get data from fields from another section.
My code is:
{% for kontaktEntry in craft.entries.section('kontakt').entry.kontakter %}
<div>
<a href=...
2
votes
2
answers
41
views
Any ID I could reference in sections
I created a section for appointment record (channel type). Each appointment record has different fields, i.e. customer name, phone#, address, etc... I would like to set a unique appointment_record_id (...
1
vote
2
answers
589
views
Nested IA Structure - What's the best way to get it set up?
I'm beginning to work on my first Craft CMS website. (I'm really excited!) I've read a ton of documentation and am getting my head around setting up a structure within the system.
The website will ...
2
votes
1
answer
245
views
Organizing Entry, Section, and Category hierarchies
I have a site with three broad sections of content: Humanities, Business, and Music.
Within each of these are sub-sections. Under "Humanities", for example, is Politics, History, Economics, etc. ...
0
votes
1
answer
70
views
Can structure entries have their own entries?
I have a bunch of categories within a section on my website, but I want each category item within that section to be able to have an additional slug. For example:
mywebsite.com/categories/category/...
2
votes
1
answer
108
views
How to structurize a multi-project documentation site?
I'm currently working on our new Docs website. This site should hold the documentation for all our projects.
I thought I could structurize the content like this:
Project 1 (<-- Section)
...