0

I'm trying to create a place where I can put general site details, like twitter feed, contact details, and other things that could be used on multiple pages, but I'm not sure of where to put them. As I understand it, the choices are:

  1. Config files. Downside is that it would be hard to edit for clients.

  2. Create a contenttype and add it as a piece of content. Downside is that it would then have a url, possibility of multiple entries, etc.

Is there a way that I can create a contenttype that only has one possible piece of content, and has no way of being displayed (i.e. a specific url) without being explicitly called within a template?

Edit: similarly for pages. If I want to create an "About" page, it will likely have many different fields (content areas, for example) from other pages, so it makes no sense to create a "page" contenttype to hold it. But equally, I don't want the client to be able to create multiple "about" contenttypes.

babbaggeii
  • 7,577
  • 20
  • 64
  • 118

1 Answers1

1

There are a few ways to approach this. What I am doing on a couple of sites is your second option, and in the templates I just do:

{% setcontent resource = 'contenttype/slug-name' %}
{{ resource.fieldname }}

You could probably set up routing to catch the contenttype URIs and send them to the homepage, but I don't worry as I have them excluded in the sitemap.xml anyway.

Gawain
  • 1,568
  • 10
  • 8
  • Right, I thought that would be the way to go. I hope that they can develop a 'singular' contenttype in the future. – babbaggeii Sep 12 '14 at 11:34