4

I´m thinking where to store static stuff like "About us", "Adress info", "Driving directions". Entities, that contain of - Text - Headlines - Image - Links - but don´t change often and live just in one place.

I see three options 1) Put the stuff straight into the template. 2) Set up a variable, e.g. {impressum}. 3) Set up a special channel, called statics with a fieldgroup called statics, that has just one richtext field and make "About us", "Driving directions",... entries.

My question: Which of the 3 ist best in terms of - maintenance - performance

I would opt for 2). Set up a variable, put the HTML together in my HTML editor, paste it into the variable and then use the varibale in the template. I would use static/index as TG/T and use segments to decide what variable should be used. That would seperate code from content and save me from the overhead of having a dedicated channel. The reason why I mentioned version 3) is, that this would allow me to have all content in one place. Having entries, variables and sometimes snippets makes the content scattered all over the place.

8

I think one of the best options today is to use either Low Variables or Republic Variables:

Low Variables

Republic Variables

There is plenty of information on the two add-on sites so, I won't go into crazy detail. I personally use Low Vars and it's pretty much amazing for this type of stuff and so much more!

Also, if you don't want stuff scattered around the CP you could checkout Zoo Flexible Admin like @janvl mentioned and if you are using Structure you could install Encaf Where is the LV? which will create a link in the Structure Tree:

Encaf Where is the LV?

  • Natetronn beat me to it. I use Republic Variables and it's easy to manage. My current method is to group labels and descriptions into well-labeled variable groups for easy access. For those objects, I then decide which user groups have access to 1) the module, and then 2) the particular group, and user management remains easy. It's a heck of a lot faster display than using a channel and if I want to go multi-lingual, there's not much to change. – Holland Dec 13 '12 at 13:12
  • I installed Republic Variables and it works well. I will look into ZFA, when thinks become too complicated. Thanks to all for the valuable comments (e.g. going multi-lingual) – awa Dec 14 '12 at 16:06
0

we usually create different channels for all these areas, but with the same field group.

So your "default" field group contains: title, body, images & links. And you assign this field-group for all your "static" channels.

so, a static about page looks like this:

{exp:channel:entries channel="about" limit="1"}
  <h1>{title}</h1>
  <p>{body}</p>
{/exp:channel:entries}


and a "driving directions" page looks very similar:

{exp:channel:entries channel="driving" limit="1"}
  <h1>{title}</h1>
  <p>{body}</p>
{/exp:channel:entries}


The benefits are:

  • easy to maintain and set up, no add-ons or anything needed.
  • your client can easily access & edit all the info.
  • reusable code.

To make it even easier for our clients, we use zoo flexible admin:
We set up a top level menu button for each of our pages, and directly link to the 1 entry in our channel by using the "custom link" functionality provided by zoo flexible admin.

  • How many custom channels do you need on average for a real life project? Just asking to find out how much clutter that will ad to the publish page. Maybe it would be a good idea to name them like z_about, z_driving to make them last in the list. I will have a look at the zoo add-on – awa Dec 13 '12 at 11:09
  • on average, somewhere between 5 & 10 channels, I think. But with zoo flexible admin there isn't any clutter. F.ex, this is how the client's back-end looks for a website I'm working on right now: cl.ly/image/1L23452h2g0Z – janvl Dec 13 '12 at 11:28
  • I used to do this but having a seperate db query for labels was slow and inefficient. Also, with Modules like Republic Variables, you can allow only certain user levels access to it. – Holland Dec 13 '12 at 13:10
0

For a small number of text bits, I use Snippets, with a direct link in the CP for client. I just login as the client-user and make a quick link via the "+ Add" button which you can find in the main navigation. This button takes me to the Main Menu Manger so I can setup the title of the nav item any way I like. For example:

Main Menu Manager

Insure that the users' member group has access to Snippets. Not as efficient if you have a bunch of users - then Zoo Flexible Admin or something like this will be a better solution.

  • How do you setup a direct link in the CP, would you care to elaborate a bit by editing your answer? – Natetronn Dec 14 '12 at 1:02
  • I just login as the client-user and make a quick link. Insure that the users' member group has access to Snippets. Not as efficient if you have a bunch of users - then Zoo Flexible Admin or something like this will be a better solution. – 4midori Dec 14 '12 at 4:35
  • I added your comment to the answer plus an image for kicks and giggles :) – Natetronn Dec 14 '12 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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