2

I created a channel that has fields like:

  • company name
  • address
  • a matrix of daily working hours
  • etc

Throughout the site, I need to display bits and pieces of this data. Does that mean I need to use exp:channel:entries every time to get the info? Seems expensive.

7

If the project has relatively low needs in terms of site-wide data (read, If you don't need custom fields), then I tend to store these in global variables and snippets.

When I need to store more advanced content, I personally use low variables. Pretty much a default now on medium or big EE builds. You can then use custom fields like Matrix, Wygwam, playa, etc. The native custom fields it offers are also great and worth looking into. Not to mention the fact that you can tweak parse order ... do I sound enthusiastic?

  • Is EE an expensive CMS? Seems like every time I need to do something, I have to buy an add-on. – ExpressionEngineNewbie Feb 4 '13 at 10:49
  • 1
    That depends on your definition of expensive. For the most part commercial EE addons are a real asset to developers as they're a fraction of the cost of building similar functionality in-house. That said, there are various addons out there that implement features which probably should be part of the core product. Anyway, that's not really a subject for SE. You might want to try the Single Entry addon instead if you're on a tight budget. – Dom Stubbs Feb 4 '13 at 10:57
  • Not sure how Single Entry solves my problem. That just restricts channel entries to 1, right? – ExpressionEngineNewbie Feb 4 '13 at 11:30
  • Low Vars is useful when you have single instances of a chunk of content, as opposed to identical sets of content (which suit the Channel module well). The Single Entry addon has a similar use to Low Vars but it's much simpler, hence the lower price. I'd assumed you wanted to determine the best way of storing various chunks of data relating to a single company. If you have many companies then yes the channel module is the best place to store them. It's probably the best way of accessing them too, unless you fancy building your own queries. – Dom Stubbs Feb 4 '13 at 11:39
  • 1
    "Is EE an expensive CMS? Seems like every time I need to do something, I have to buy an add-on." Actually, you've already figured out how to do it without an add-on (using a channel). The add-on route in this case makes a better solution. And, for a lightweight, free alternative to Low Variables, look at Republic Variables. – Derek Hogue Feb 4 '13 at 13:06
0

You can approach it as a channel entry with decent performance if you store the bits you need for re-use with Stash. Low Variables may be the approach I would prefer for bits like this, but I have done it with channel entries and stash before and it has worked well, stashing content bits with a scope of "site" and with a high refresh interval since this type of content is not likely to change often.

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.