Take the 2-minute tour ×
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It's 100% free, no registration required.

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.dev/blog which is editable in the CMS, with its own fields? I'd like to do this so I can have a CMS editable introduction to the blog section, rather than having to hard-code an introduction into the template that would then list the latest X blog posts.

I can't create a Single called 'blog' because that handle is already taken by the Section itself, so how would I go about this? I'd considered using a Global, but that seems a bit off (it's not global content, it's a singular page's content) not to mention repetative/non-DRY if I had multiple sections to do similar things with, or if there were multiple fields I wanted applying on the overview/landing page. Is there a neater solution?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Create a Single called "Blog Overview" and set its URI to "blog" and its "Entry Template" to "blog/index" (your blog listing template).

Then just override the title to "Blog" either by hard coding it in the index template, using an "title override" field, not showing its title etc.

share|improve this answer
3  
Or, you could rename the Channel, and let the Single have the title "Blog" uncontested. –  Marion Newlevant Jul 21 at 18:39
    
Ah! So treat a Channel as 'Blog Entries' and the overview page Single as 'Blog', then set the channel URLs to be /blog/{slug} while the overview single is /blog - Ok that makes sense! Thank you both :) –  Matt Wilcox Jul 21 at 18:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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