Jump to content

Understanding the concept of separated layout and content


Anke
 Share

Recommended Posts

Hi all,

I'm an absolute PW rookie, but starting to work my way through this alternative way of handling websites, thanks to your great documentation. Coming from the "regular" CMS world, where most systems provide something like editable layout templates and/or CSS editors in the backend, I'm trying to understand the concept of PW.

Am I getting this right, that In the PW backend I "only" set up the fields, like e.g. headline and body, and then those field variables have to manually be added to a template file ($headline, $body) wrapped in the required hard-coded HTML markup and CSS ids and classes?

Anke

Link to comment
Share on other sites

You can also add fields, which let you manipulate the layout and not the content, but ProcessWire by itself does not concern itself with what your frontend does look like. You're fully on your own there (can be a good or bad thing depending on the situation).

Link to comment
Share on other sites

Quote

Coming from the "regular" CMS world,

Key issue is to shed "regular cms thinking and habits" and get used to processwire decoupled way of doing things. Processwire having 0 limits can be confusing for a while. This issue has many posts in the forum. I recommend reading them. Also going through tutorials speeds up getting used to decoupled and the page concept.

https://processwire.com/docs/tutorials/

  • Like 1
Link to comment
Share on other sites

The good reason here is being a content-management system and not a layout-factory of sorts. It's there to store content, while being concerned as little as possible about whichever way the content will be served to the user. This is up to the developer to decide/implement.

13 minutes ago, Anke said:

… at first glance this handling appears a bit middleagean.

In fact it's rather the opposite. E.g. drupal is recently trying to shift more towards being a potentially headless cms, which is not coupled to any kind of output strategy (html+css is only one possibility). With the shift to more and more content being served over multiple channels at the same time (website + api / website + mobile app / …) it's also needed to have this freedom.

But as I said it always depends on the individuals situation. If you need something to click together the layouts in the backend ProcessWire might not be the best fit.

  • Like 4
Link to comment
Share on other sites

I didn't mean to question PW's concept in general, although I don't share your opinion that a content management system ought to be concerned as little as possible with the way content is being presented. IMO content and layout are equally important, more so a convincing layout can sucessfully sell poor content (one of the simpler marketing rules). But that's not the point.

By calling the handling kind of "behind the times", I was referring to the fact that files a) have to be created and hardcoded by hand and b) reallocated on the server (requiring FTP or other connection types). What is keeping PW from providing a little file manager and a code editor, ideally providing field variables and other snippets, so that everything can quite comfortably be achieved right in the backend?

Link to comment
Share on other sites

6 hours ago, Anke said:

What is keeping PW from providing a little file manager and a code editor, ideally providing field variables and other snippets, so that everything can quite comfortably be achieved right in the backend?

Conceptually such a module will never be part of the ProcessWire core, however, thanks to developers there are lots of useful modules out there solving various needs such as:

Think of ProcessWire as a Content Management Framework and not as a CMS. The phrase CMS is used because the ProcessWire backend is powerful enough to be called so. ProcessWire is somewhere between a CMS like Joomla and a framework like CodeIgniter. And this is done all conceptually. Those who rely on it appreciate this, that is why we are here in the first place. You might need something else, it is up to you to decide.

BTW, there are similar systems out there (such as SilverStripe that comes to my mind), meaning ProcessWire is not a one-of-its-kind system at all in this regard. However it is a one-of-its-kind in its OWN category :) 

Hope this helps.

Edited by szabesz
typo
  • Like 3
Link to comment
Share on other sites

On 2017-5-23 at 2:52 PM, Anke said:

Am I getting this right, that In the PW backend I "only" set up the fields, like e.g. headline and body, and then those field variables have to manually be added to a template file ($headline, $body) wrapped in the required hard-coded HTML markup and CSS ids and classes?

That's it. Personally, after using Drupal, then Wordpress, I find it very liberating not having to set up predefined 'regions' or any of that stuff. I create the fields, populate them, then they go where I want them to go by simply sticking them in a template, job done. Craft CMS is very similar to this approach but has a price tag with it per site that led me to PW. Glad I did though, try it out, you might like it.

On 2017-5-24 at 5:55 AM, szabesz said:

Those who rely on it appreciate this, that is why we are here in the

 Absolutely :)

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...