clsource

Processwire as a Headless CMS

Recommended Posts

Hello,

Upon reading these articles

https://dev.to/maxlaboisson/an-introduction-to-api-first-cms-with-directus-open-source-headless-cms-9f6

https://snipcart.com/blog/jamstack-clients-static-site-cms

I was thinking that PW can be used for a Jamstack or Headless CMS with no changes at all.

You can easily create  REST Api with PW or use the GraphQL module

https://github.com/dadish/ProcessGraphQL

 

So ProcessWire is an Open Source Headless CMS since 2010 :)

  • Like 9

Share this post


Link to post
Share on other sites

Maybe I don't fully understand the term headless, but I would have thought that PW is ALWAYS headless, even with our typical way of using the API.

Surely headless doesn't just mean delivery via JSON etc, but rather simply no forced output. I have used PW in the "regular" way for websites, but also as a JSON source for SPA web apps and mobile apps. In my mind, these are all headless, but maybe I I still don't get it, or maybe that is actually what you are saying anyway :)

  • Like 5
  • Thanks 1
  • Haha 1

Share this post


Link to post
Share on other sites
5 hours ago, adrian said:

Maybe I don't fully understand the term headless, but I would have thought that PW is ALWAYS headless, even with our typical way of using the API.

I'd say that technically ProcessWire probably isn't a headless CMS – but it can of course be used as one, and quite effectively for that matter :)

ProcessWire is very much a border case, but my impression is that if you can build a front-end with(in) a CMS, it's no longer strictly speaking a headless CMS. And you can build a front-end with ProcessWire. Sure, you interact with an API, but it's a "local" or "in-app" API, not (only) an external one.

Hope that makes sense. And, mind you, I'm not saying that ProcessWire is worse than a "real" headless CMS – in fact I'd argue that it's a better choice for many use cases, but that's obviously up to debate :P

  • Like 6

Share this post


Link to post
Share on other sites

ProcessWire is even more, it has capabilities to be a

  • conventional CMS with highly configurable Administration Interfaces, Templatesystem, Database Mangement/ Access and render tools for the output of dynamic markup
  • headless CMS providing content data via API (JSON, GraphQL) and optionally static HTML + JavaScript (HUGO/ Jekyll)
  • WAF (Web Application Framework) a platform to build a headless CMS or other App/ SaaS on top of fit

Make your choice! :rolleyes:

 

  • Like 7

Share this post


Link to post
Share on other sites

sigh... I must say some folks are quite good at marketing. I don't blame them. It's a free market. There's nothing I saw in this article that wouldn't be possible with PW (and without any extra modules either), more or less out of the box. What Magnolia calls fragments is apparently nothing more than PW's fields. But I have to hand it to them, they seem to know how to translate all that tech lingo to marketing speak.

 

  • Like 4

Share this post


Link to post
Share on other sites

OMG, not again... https://www.pilcro.com/blog/headless-cms

Quote

So what is it? Headless CMS is a Content Management System without a front-end. There is no theme to choose, no pages or UI to build your web pages. Its Wordpress but you provide the webpage.

There is no presentation layer.

You create the content, but you don’t specify where it is presented. The content itself is only available as raw content that can be requested by apps via a programmatic API.

By that definition, PW is most definitely a HCMS...

  • Like 3

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MischaK
      I'm someone who has been developing websites for a while, mostly doing full stack .NET development and ASP scripting before that, while using Silverstripe and some other PHP frameworks for some smaller projects which worked well enough for quite some time. 
      Now I have some time on my hands and decided to evaluate some different CMS options. 
      Diving in as a newbie into: 
      Wordpress 
      Processwire 
      CraftCMS
      After a short while I decided that Wordpress was out while I'm still evaluating Craft and Processwire. 
      My question is, is there any interest here in reading about my experiences in trying to get the feature set I want up and running, with these other systems?
    • By EyeDentify
      I as have been a bit confused for some time about how the "Markup Regions" functionality in Processwire worked.
      But i have know read a bit more and think that i am getting to grips with it. And Markup Regions is going to be huge.

      To aid me in understanding Markup Regions better i started to read the Source code for the new "Regular" theme in conjunction with the Blog about the markup regions.
      It helped me a great deal to understand the basics and more fine details of it.

      A tip is to open both links and use the Source code of the "Regular" theme while reading the blog post.
       
      The Source code:
      https://github.com/processwire/processwire/blob/dev/site-regular/templates/_main.php
      The Blog post:
      https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/
       
      I hope this could help others starting out with markup regions.
      Just take it slow and read it a couple a times and soon you will see the greatness of markup regions.

      /EyeDentify 
    • By EyeDentify
      Hello Fellow PW Fans and Gurus.

      I have run into a problem where i have created a template without a template file associated with it.
      Now i would like to HAVE a template file associated with it, not an alternate but as the main template file.

      So i thought, that's easy, I upload the template file and change it in template settings but I only get the Alternate template file setting?

      Ok so maybe i can change it via the API , so i wrote some code for this.
      <?PHP function changeTemplate($pages = null, $templates = null) { /* get the pages to change template on */ $logItems = $pages->findMany('template=tmp_log_item'); /* get the template object for our desired template */ $Template = $templates->get('tmp_new_log_item'); foreach($logItems AS $key => $logData) { /* use template object $Template to set template */ $logData->template = $Template; /* save page item */ $logData->save(); } } /* do the magic change */ changeTemplate(); ?> Needless to say, PW was not happy about this, It throw up an error message:
      Error: Exception: Invalid value sent to Page::setTemplate (in /home/virtual/mydomain/public_html/wire/core/Page.php line 1782)
      Now from what i understand i gave $logData->template the wrong type of value.
      So what should the value be to correct this?
      When I read the docs at: https://processwire.com/api/ref/page/
      the value can be "string" or "Template".

      So i gave it a string and it went haywire.

      How should I approach this cause I realy dont want to manually change template file on över 50 plus pages

      Maybe I should use the Template class to create the value that the API wanted, but I am unsure how to use it.

      Thank you for any info you can give me on this.

      If you want more info to help me, ask and I will try my best to give it to you.
      Updated and Solved
      I solved the problem and have updated the code to reflect this.

      Essentialy i used the get() method of $templates to get the template object for my template i wanted to use using the template name.
      I gave the Object to the $logData->template property and all went well.
      We learn something new every day.
      One Note:
      The template file you want to use must have been uploaded and added as a template in the Template section in the Admin for this code to work as expected.
    • By DaveDev
      I want the admin to select one of the child of a parent in "page reference" as radio buttons, but it comes out empty
      here is my hook in site/ready.php
      $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) {   if ($event->object->hasField == 'childLinks') {     $page = $event->arguments('page');     $parent = "parent=" . $page->path;     $event->return = $event->pages->find($parent);   } });  
    • By Mustafa-Online
      MBR international is Sudanese mining company. The company aims to maximize shareholder value by through
      exploration and Production of precious metal and industrial mineral, MBR international mining subsidiary was established in 2015, engaged in Industrial Minerals and Metals mining and related activities including explorations, extraction and processing. 
      **************