Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [singles]

One of Craft's [Section Types](http://buildwithcraft.com/docs/sections-and-entries#section-types).

1
vote
1answer
14 views

How do I setup the Login Page to work with requireLogin?

I want to create a login page. It would be a Single. The URI is set to login. So how do I name and map the twig file? I tried: creating a login folder under templates. naming the twig file ...
2
votes
1answer
26 views

Change name of Singles

Is there an updated version for Craft 3 showing how to change the name of 'Singles' and 'Structures'? https://www.youtube.com/watch?v=ObC4mhXjiOE
2
votes
1answer
133 views

Multi sites: how to give each site a home single entry?

I've been experimenting with Craft 3 and Multi Sites and feel like I'm missing something... My organisation has a main homepage and multiple sub-sites. I have a Single Section called 'home' that ...
1
vote
1answer
102 views

Singles or routes solution

Most websites have three distinct types of page. List of items Item Special layout of items / content A list of entries require a list view. Craft lets us do this with singles - eg blog index page. ...
0
votes
0answers
83 views

Hosting an Angular App in Craft

I am new to Craft cms. I am trying to host an angular app in Craft but I am having issues with the routing. I created a single page in craft called /app and created a template folder called app. When ...
1
vote
1answer
54 views

Single entry with 450 Matrix blocks throwing error on save

A client has a Singles entry with a Matrix block defined that contains a few text fields, and one image field. They've created approximately 450 instances of this Matrix block, and can no longer ...
1
vote
1answer
190 views

Using Structures instead of Singles

Has anyone ever tried using Structures instead of Singles? I'm developing something that's kind of like multiple sites in one, they share the same central design, just with content differences and a ...
1
vote
1answer
197 views

Translating a section's title field on save

For a Single section's entry type that has the title field hidden, I'd like to translate the generated title, as per the entry's locale. I've currently got the following in the entry type's "Title ...
1
vote
1answer
228 views

Can't Access Image URL on Single Page

I have the 404 page setup as a single in sections under page404. I have a postImage field that pulls images from assets. It is assigned to the page404 field layout and it is assigned in the entry. ...
1
vote
1answer
132 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 ...
0
votes
1answer
109 views

Single not loading correctly with additional segments

I've got a single set up to point to /calendar on my site. the single has only one field, SEOmatic so I can add meta title, description etc.. the rest of he page is loaded with content from the ...
1
vote
2answers
849 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?
1
vote
1answer
235 views

Different Single as homepage for other languages

How can I give another localization its own "Single" as homepage. My main language has its own very unique homepage but for the other languages I need all the fields and HTML/CSS of my about us page. ...
2
votes
1answer
125 views

How to get specific single with status live

How can I get a specific single (careers) with status live in twig?
5
votes
1answer
289 views

Globals versus Singles

We are building a restaurant site that has a banner image and some introductory text on each page. For pages that include content from a Channel, e.g. the wine list, we are using a Global to define ...
0
votes
0answers
249 views

No entries showing: Unknown error has occurred

I have recently uploaded our dev site to the live server so we can populate with correct assets and deploy once complete. I've set all variables I can think of to reflect the new environment, but for ...
1
vote
2answers
138 views

Organizing repeating content on a single page

I have a page with a slider on it, which includes three rotating slides. In Craft, I am currently setting up each slide as an entry under a "Home Page Content" channel, and then creating an entry ...
1
vote
2answers
398 views

How to render entries on a singles page in a specific pattern/order?

On my homepage I have one entry that is constantly there. Below that entry I want to display 2 different types of entries in an alternate order (gallery, update, gallery, update...). Right now I have ...
0
votes
1answer
193 views

Simple linkage to singles

For some reason there is not really a clear mention on the Craft documentation about this. And I couldn't really find anything in here that explains it either. I know this is kind of basic knowledge ...
0
votes
1answer
103 views

content and fields won't show up on new single

I just installed Craft, linked it to my database (localhost) and then created a new single "about" page. But when I go to edit the single, there are no fields. I haven't changed anything else! When I ...
5
votes
3answers
2k views

How to use a Structure including a homepage

As far as I can tell, it's mandatory to have a Single as the site index. I always use a Structure for organising my pages, and different entry types for different page templates. I intend to use a ...
4
votes
2answers
3k views

How do I get the url of single pages?

I've been struggling all evening with getting the urls of my singles in a menu generator. At first I thought I nailed it, but it turned out it used the title of the singles instead of the url. When I ...
0
votes
1answer
2k views

How to properly setup single page templates

I created a single page called About, (http://sandbox.fusepointe.com/hcnew/about). My template directory file structure looks like this: craft | templates | about | _layout-about.html ...
0
votes
1answer
2k views

Image asset not being displayed

This is my second website I am building with craft cms and I have no prior experience with Twig. I have had a particular issue with echoing image assets from a singles entry. The line I copied from ...
3
votes
2answers
2k views

Get content of single by slug

I'm trying to get the content of a single using a slug from the url. I'm using the following code: {% set item = craft.entries.slug(craft.request.getSegment(1)).first() %} This doesn't work, returns ...
2
votes
1answer
896 views

Simple navigation with active class?

What is the best way to create a simple (one level) navigation that also have active class? My section types are singles only for now. Thank you
1
vote
1answer
613 views

Loop through fields from 'single'

I have a structure for different categories like salad, soup, main course and so on. Basically they share the same fields - but I want to be able to have dynamic singles based on those structures. For ...
3
votes
2answers
2k views

How do I return ALL entries that are singles

I'm trying to generate a sitemap and wish to output all the entries that have a section type of 'single' but can't get the the correct syntax. All of the entries need to return 'single' for {entry....
6
votes
1answer
998 views

Password protect a single page

Is it possible to password protect a single page in Craft? Wordpress has this functionality built in. I would love to do it in Craft as well.
7
votes
1answer
1k views

Route breaks Single Entry

I'm following the documentation to create a thank-you page when the user submits the form. I have a single created for /contact-us/ and I want the user to be redirected to /contact-us/thank-you/ when ...
5
votes
1answer
767 views

How flexible is tying content to a structure?

I'm trying to decide how to organize my content on a site with a few levels of hierarchical content. I'm toying with the idea of creating structures for all my top level navigation items, with a few ...
10
votes
3answers
3k views

What's the best way to set up a content-manageable 404 page?

I'd like to make my 404 page editable through Craft, but when I create a single for it, a URI is required. Is there a way to make a single with no URI, or is the best route to setup globals for ...
15
votes
6answers
4k views

How to write a simple navigation?

After endless trial and error I figured out the right syntax for a simple one level navigation. {% set navi = craft.entries.section('not projekteintrag' ) %} {% for entry in navi.order('id asc') %} ...