Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2020-07-03 23:19:49

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,667
Website

Re: what is Headless CMS

michaelkpate wrote #324220:

Markdown Extra textfilter for Textpattern 4.6+

thanks!

I am currently playing with a bootstrapious theme i have downloaded and getting it incorporated into TxP where all content updates/edits will be done. it is basically a one page site. It uses MD so i thought i would try using that editor. Although textile is fine as well.

i just have to figure out how all the articles are output to the various sections. I guess that is done by ID Number?


…. texted postive

Offline

#22 2020-07-04 06:46:59

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,885
Website

Re: what is Headless CMS

bici wrote #324262:

It uses MD so i thought i would try using that editor. Although textile is fine as well.

Yes, for the actual text input from the site author, either should work within the theme.

i just have to figure out how all the articles are output to the various sections. I guess that is done by ID Number?

One way you could do that is to leverage the new pageless sections in txp 4.8.1. A rough scheme could be:

  • Make each of the page sections of your one-page site a section. Assign them no page template – the empty option in the dropdown that shows as “None” in the list. That way people can’t call them up via an url.
  • Instead of using page templates, use forms named {section-name}_section (or similar) for each of the page sections.
  • For page sections with one static piece of information, use an article assigned to that section with limit="1" for the content. For page sections with multiple items, e.g. flip-flop panels, grid of services, sliders etc. use articles assigned to that section. Sliders or grids of images you do with images (and their captions), testimonials perhaps with things like links.
  • On the default page template (or whatever you have assigned to the default section), use a “txp:section_list” to output the list of sections in the order you want them, roughly like:
<txp:section_list sections="about,features,services,quote,testimonials,contact" wraptag="section" class="whatever" form='<txp:section />_section' />

That will output each section below the next.

If you want to give different page sections a different colour background, you could do that manually or use jcr_section_custom to add a custom field to the section pane so that users can change the background colour. If you want the users to able to switch around the order of the sections, you could use esq_sectionsort.

And if you have some other sections on the site that aren’t part of the one-page site, e.g. legal infos or a blog section with sub-pages, just create those as regular sections and then use the exclude attribute of txp:section_list to exclude them from the one-page part of the site.


TXP Builders – finely-crafted code, design and txp

Offline

#23 2020-07-04 20:17:03

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,667
Website

Re: what is Headless CMS

Many thanks @jakob . I have been thinking about how to structure the Txp backend and you have provided some great tips. I was not aware of new pageless sections in txp 4.8.1. I’ll have to review that.

I’ll work on this in my spare time, over the summer … hoping for more out door activities in the next few months!
But i am super excited in getting this to work under Txp. I am sure my friend will find it useful. her current work in progress is at new.renzullofoodmarket … i’ll input that to TxP

Then i will use Txp with another theme that i was going to do in Hugo and which i will now abandon. The pain of CLI and GIT and all the other admin stuff is just not worth it. Uisng the Universal bootstrap theme in TxP is doable


…. texted postive

Offline

#24 2020-07-04 20:27:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,612
Website

Re: what is Headless CMS

*cough* pageless sections exposé *cough*


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#25 2020-07-04 20:30:25

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,667
Website

Re: what is Headless CMS

Bloke wrote #324288:

cough pageless sections exposé cough

Gee how did i miss that – -;) one month late to the undercover party


…. texted postive

Offline

Board footer

Powered by FluxBB