Jump to content
Anke

Understanding the concept of separated layout and content

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

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

Thank you for your instant reply. In fact at first glance this handling appears a bit middleagean, but I'm sure there's a good reason for it ;-)

.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Greg Lumley
      Hi! In busy learning to know PW better I'm looking at existing code.
      I have Bitpoets Editorial Responsive Blog as example. While looking through the code I've just found this line in the blog-head.php 
      <link rel="stylesheet" href="<?= $config->urls->templates ?>assets/css/main.css?ts=<?= time() ?>" /> I hope it's not a stupid question but I've never seen this before...
      main.css?ts=<?= time() ?> I notice the main template is empty but of course renders on the front end.
      Using a timestamp really has me totally confused. Can someone explain it to me please. 
      Thank you! 
      Greg
    • By hellomoto
      I can't tell what's wrong; my local development version appears just fine, but I copy over the site files and db online and the homepage content is not being contained. This is what it should look like (same site in the same browser, running on my localhost): http://imgur.com/UFZFzrd
      What could be the problem here? Sorry to bring up something so irrelevant to PW here, I just know that you all are a valiant and helpful group, and no one on StackExchange seems to even know what I'm talking about.
      Thanks a lot.
    • By picarica
      so i just downloaded this template  and i uploaded it to my server made some .php changes so it would work and stuff but all the css-transitions or css-animations don't work. they just stop
      if you checked out the template all those buttons are smooth and really nice, bit when you check out my site all those animations are gone, why is that? is there some option i have to toggle? or is it normal? how do i fix it ?
    • By CareerTeam GmbH
      Hi there,
      We are an executive search agency based in Germany looking for a freelancer (2-5 days per week) supporting us with the development and design of our websites. The position will be located in Hamburg, Germany and it would be great if you are on short call. German language knowledge is mandatory. 
      You can reach me via email jobs@careerteam.de.
      Thank you!
      Regards
      Annemie
    • By rafaoski
      This profile can be used as a simple business card or blog.
      The profile does not use any framework css structure, only styles based on CSS GRID and FLEX.
      To minimize page loading, I added lazy load for images ( Tupola Lazy Load ).
      With include functions like:
      MarkupRegions
      FunctionsAPI
      CAN DOWNLOAD FROM THIS LINK:
      https://github.com/rafaoski/site-grayscale-pw
      https://github.com/rafaoski/site-min-grayscale-pw
      Screenshot:

       
×
×
  • Create New...