0

I’m having sort of a dilemma and since I never actually used channels in EE (yes, that is strange) except for a blog section I was curious what the real benefit is. I just don’t see it.

Let me make one example and maybe someone with more experience can answer this with a technical approach on why they are better.

I need to create documentation. So assume /help is a (template) which then embeds for example another intro template. So now you have /help/intro and of course you write your usual help documentation on intro or any other template files.

In the index of the group templates “help” I can just create if segments calls, for example:

{if segment_3 == 'to-super-product'}embed="help/some-other-template "}{/if}

And now we have something nice like:

example.com/help/intro/to-super-product

Now, of course the proper way is to use channel entries for each article so instead of using a segment_3 you create a channel entry for each chapter.

The problem with that approach is that now you are limited to the constraints on the channel entries boxes. Unless you use a plugin from Ellis Lab you cannot use EE variables inside a content anymore and they advise against it for security.

For example with the templates approach I could have a variable called {version_number} and use this on all my documentation, I change that variable and its changed everywhere. I can edit and design everything as I want with HTML and the help articles are completely dynamic.

But if you go the channel entry route, you are constrained to making the content static. You cannot use the {version_number} anymore, or if you want to change colors, fonts or other things help wide you cannot do this unless you go to the Expression Engine control panel and edit each channel entry individually.

I’m surprised why everyone is using channels when it seems inferior. The only advantage I see here is if you need to let users that are not coders/designers to edit the content and you don’t want them messing any code. But to achieve the same visual effects in a page, you would have to create a lot of different channel entries which they need to edit one by one.

What I’m approaching wrong here? Editing HTML files seems like cleaner and I can make them dynamic vs having static channel entries. When I mean static, I mean the content inside. For example changing fonts, notes, version numbers, product names...

UPDATED:

I don’t use it to create static HTML and this is exactly what channels do. When you get content from a channel, that content of HTML block is constrained by only the HTML that someone saved from the control panel.

Let me try to clarify this. I don’t let anyone else edit the content now. I create the content. Maybe that is why I see little use with channels today. I can completely understand how useful they are to separate content from code if you are allowing other people to edit or add content text or images to pages.

Let me make a simple example. Do you see the yellow box on your reply that you quoted? Lets assume this is pulled from a channel entry. That text is all you get in terms of formatting. If you want to change letters to BB or change something dynamically with CSS you can’t.

But if the same text is directly saved in a template, and I have the correct EE variables around the content or code I want, I can modify it on the fly, site wide. This is exactly why EE is so great. You can make sites dynamic. But channels are static content. Yes, you can limit how may entries, sort them by date, category, and many other things but the content you get from a channel entry is fixed and limited by the fields you allowed someone to save from the control panel.

I'm not new to EE. I used it since version 2 but just never had to use channels because I feel constrained by them vs just editing templates directly which seems cleaner and faster. All the examples and tutorials are the same. They show how to create a news section, a blog, or other simple blocks of texts entries you would add to a database. Nobody seems to create a very advanced use or case scenario example. I can also see channels being useful in that regards, if you need to enter a lot of items which are similar and then need to classify or sort them. In that case, a channel entry is a database entry so its very useful for data organization/classification. But I'm referring to unique web page content that is completely different but you still need to change it automatically or dynamically on a site.

  • Sorry, I was never alerted that you edited your question. But even still... I really don't think you understand the use-cases of a commercial grade CMS. You aren't utilizing it as a CMS, which is under-utilizing. Have you considered building your site out in an MVC framework? If you don't have/need content-editors/comms-people in a commercial/business setting, EE seems wrong for you. – jrothafer Nov 6 '18 at 9:29
  • Also, in CMS systems, you seem to have it soooo backwards.... CMS database entries are the dynamic content. Templating and views are the static part of the site that renders dynamic content in a template and style framework so you have consistent branding and control over the layout and styles of that dynamic content as developer. I really mean no offense, but we must come from very different professional development worlds. – jrothafer Nov 6 '18 at 9:31
3

I'm really confused by your question, but I'm going to make an attempt at clarifying some base concepts that I think you are wrongly assuming about a commercial grade CMS (content management system) like ExpressionEngine, and CMS's in general (possibly, not trying to say you don't know what you are doing).

First of all, this is a content management system. It is not a static site generator or a system for implementing flat html content. It is a CMS. The base idea behind a CMS is that you have a functional system that creates a connection between data that lives in a database and how you express and control the output of that data through templating. CMS's also add functionality like user registration and dynamic routing and so on. EE does this.

For example with the templates approach I could have a variable called {version_number} and use this on all my documentation, I change that variable and its changed everywhere. I can edit and design everything as I want with HTML and the help articles are completely dynamic.

But if you go the channel entry route, you are constrained to making the content static. You cannot use the {version_number} anymore, or if you want to change colors, fonts or other things help wide you cannot do this unless you go to the Expression Engine control panel and edit each channel entry individually.

OK... This is where I get really confused.

The system of data control in Channels and how you template are not at all fractured. They work together great. The point of a system like this is to allow developers to create a diverse CMS that lets content editors do their job without having to know HTML or CSS or JS or EE templating code.

For example, you could control versioning of your documentation through EE Categories and Channels. The EE documentation does it without issue. And it does it with:

-Different styles from EE2 to EE3/EE4 docs
-Different architecture throughout
-Possibly different search appliances depending on the doc version you are looking at

I keep saying I'm confused because EE is a fine system for architecting and implementing documentation. I've done it and seen other (way more talented) developers do it as well.

I think you need to re-tour the basic docs on this system if you want to keep using it. If what you want is a flat site with no content control, this isn't the right choice because you are way under-using its capabilities.

Please edit your question with a little more info on what your site is trying to do. We want to help, but from your question I can only assume you don't know what you need or you don't know how to utilize EE properly.

| improve this answer | |

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.