Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2026-01-16 05:48:16

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,408
Website GitHub Mastodon

Re: Theme four-point-nine

This theme is amazing, giving me truly hope for the future (pun intended). I consider this a valid starting point for a new site – which will probably remain there for the next few years (provisional solutions do have a habit of lasting forever. As life teaches us).

1 One thing, though. I think the benefits of Textpattern shine bright enough in the initial article, even for the first-time user. We wouldn’t feel the unsatisfiable desire to name other CMSes (e. g. the one with a capital_P_dangit in their name).

2 I think it’s about time to remove the footer link to the notorious site formerly known as Twitter.

Offline

#14 2026-01-16 07:41:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,392
Website GitHub

Re: Theme four-point-nine

wet wrote #342243:

We wouldn’t feel the unsatisfiable desire to name other CMSes (e. g. the one with a capital_P_dangit in their name).

That’s probably just because it’s cloned from the source material. I doubt we’ll use that as the welcome article content (although we could borrow bits and rephrase them, perhaps).


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#15 2026-01-16 09:44:18

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,170
Website GitHub

Re: Theme four-point-nine

giz wrote #342240:

Style Variants

Cool! That’s exactly the kind of thing I was thinking. Have a main theme that provides a base scaffold and allow the user to override the CSS custom properties via the Presentation › Styles and Presentation › Sections panels.

That stylelab is a great idea too. Must look at that in more detail.

Nice to see Bridget Riley too. Have you ever seen her work in real life? It’s a mind-blowing and remarkably physical experience.


TXP Builders – finely-crafted code, design and txp

Offline

#16 2026-01-16 16:09:34

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 426
Website GitHub Twitter

Re: Theme four-point-nine

I’m a big fan; saw some of Riley’s work exhibited in Sydney 20 years ago. Blown away – the microscopic imperfections made each work hyper-tangible.

Offline

#17 2026-01-16 20:24:10

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,170
Website GitHub

Re: Theme four-point-nine

giz wrote #342253:

I’m a big fan; saw some of Riley’s work exhibited in Sydney 20 years ago. Blown away – the microscopic imperfections made each work hyper-tangible.

Yes! I’d done a project on pop art while at school, and had a postcard-sized picture on my wall during studies of a more subdued variant of the one you chose. Years later, I saw the 2003 exhibition at the Tate Britain (here and here).


TXP Builders – finely-crafted code, design and txp

Offline

#18 2026-01-17 21:25:45

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 426
Website GitHub Twitter

Re: Theme four-point-nine

I was hoping to reorder the if-this-then-that logic in the head so that it sequences in order of the request’s popularity: home, listing, detail. Simpler to read, covers most requests from a typical TXP installation, shaves processor cycles:

// ignoring the elephants in the room if_search, if_author, if_category
<txp:if_article_list>
  // any list page
  <txp:if_section name=",default">
     // home page
  <txp:else />
    // specific listing page
  </txp:if_section>
<txp:else>
  // detail page
</txp:if_article_list>

After experimenting with this for a while I realised that the current if-search-if-author-if-category-else-… order of logic is unavoidable as the tests are vital for good seo behaviour.

  1. I’ve incorporated Julian’s page-context variables directly into the head’s meta / canonical if-this-then-that so that they are ready for any other logic lower down on the page.
  2. The meta-canonical-page-variables code now lives in its own form, misc/head_metas.txp. It is rarely changed, complex, and took up most of the head, getting in the way of the more frequent edits.
<txp:if_search>
  <txp:variable name="page_context" value="search" />
  <meta name="robots" content="none">
<txp:else />
  <txp:if_author>
    <txp:variable name="page_context" value="author" />
    <meta name="robots" content="noindex, follow">
  <txp:else />
    <txp:meta_description />
    <txp:variable name="paging" value='<txp:page_url type="pg" />' />
    <txp:if_section name=",default">
      <txp:if_category>
        <meta name="robots" content="noindex, follow">
      <txp:else />
        <txp:variable name="page_context" value="home" />
        <txp:if_variable name="paging" value="1">
          <!-- default / homepage -->
          <meta name="robots" content="index, follow">
          <link rel="canonical" href="<txp:site_url />">
          <txp::schema type="WebPage" url='<txp:site_url escape="json" />' headline='<txp:site_name escape="json" />' />
        <txp:else />
          <!-- page_url has pg=2 or more-->
          <meta name="robots" content="noindex, follow">
        </txp:if_variable>
      </txp:if_category>
    <txp:else />
      <txp:if_article_list>
        <txp:variable name="page_context" value="listing" />
        <txp:if_variable name="paging" value="1">
          <!-- listing landing page -->
          <meta name="robots" content="index, follow">
          <link rel="canonical" href="<txp:section url />">
          <txp::schema type="WebPage" url='<txp:section url escape="json" />' headline='<txp:section title escape="json" />' />
        <txp:else />
          <meta name="robots" content="noindex, follow">
        </txp:if_variable>
      <txp:else />
        <txp:variable name="page_context" value="article" />
        <txp:meta_keywords separator="," />
        <txp:meta_author title />
        <meta name="robots" content="<txp:if_expires>unavailable_after: <txp:expires gmt format="%d-%b-%y %T" /> GMT<txp:else />index, follow</txp:if_expires>">
        <link rel="canonical" href="<txp:permlink />">
        <txp::schema type="WebPage" url='<txp:permlink escape="json" />' headline='<txp:title escape="json" />' />
        <meta property="og:site_name" content="<txp:site_name />">
        <meta property="og:type" content="article">
        <meta property="og:title" content="<txp:title />">
        <txp:if_description>
          <meta property="og:description" content="<txp:meta_description format="" />">
        </txp:if_description>
        <meta property="og:url" content="<txp:permlink />">
        <txp:if_article_image>
          <txp:images limit="1">
            <meta property="og:image" content="<txp:image_url />">
            <meta property="og:image:width" content="<txp:image_info type="w" />">
            <meta property="og:image:height" content="<txp:image_info type="h" />">
            <meta property="og:image:alt" content="<txp:image_info type="alt" />">
          </txp:images>
        </txp:if_article_image>
      </txp:if_article_list>
    </txp:if_section>
  </txp:if_author>
</txp:if_search>

What does everyone feel about converting the default 4-space indentation to 2-space throughout the code? While this makes no difference to those of us that use an IDE, it reduces line lengths in the Presentation tabs.

Offline

#19 2026-01-17 22:04:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,392
Website GitHub

Re: Theme four-point-nine

I usually use 2 spaces for line length reasons. The downside is that the default tab width for shift+space indentation is 4 spaces. Maybe we can expose the tab stop width as a constant? Then it can be set to some other value in config.php.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#20 Yesterday 10:02:56

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,614
Website

Re: Theme four-point-nine

A few minor points on your image handling

  • you “images” form is missing a src attribute. It validates though, surprisingly. Still it might be nicer for older browsers (src=<txp:image_url /> – full size image)
  • the img has a closing / in the code. That is not needed and the HTML validator issues a warning.
  • not sure if that is a good idea of only using sizes=auto. Firefox and Safari do not support that. Perhaps adding a fallback sizing for older browsers? sizes="auto, 50vw, (min-width 40em) 33vw, (min-width:60em) 25em", or something that fits the layout.
  • in the article default.txp form, at the bottom, txp:images need to suppress the default break attribute : break="". At the moment each figure is followed by a <br> which gives fun effects in your grid :-)

Other minor validation issue on that default article form, the <meta itemprop="dateModified" cannot be child of the <dl>, insert it as part of the <dt>, or the <dd>.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#21 Yesterday 16:30:25

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 426
Website GitHub Twitter

Re: Theme four-point-nine

Thanks, Philippe.

I’m busy with a second pass on the code after a bunch of refactoring – issues noted!

sizes="auto" works in Safari, but I’ll add that fallback…

The image code also has issues with svg (no thumb is generated as it would be redundant) so I’ll use <txp:image /> instead for .svg.

Offline

#22 Today 02:20:34

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 426
Website GitHub Twitter

Re: Theme four-point-nine

Introducing sizes="auto, parameters" introduces issues when images.txp is used throughout, as everything from full-bleed images to small thumbs need to be catered for. Which parameters to use when the template is flexible? Specifying the appropriate responsive sizes attributes is web-developer territory, and getting it wrong means scaled-up/pixellated or sub-sized images. A sizes attribute would be required wherever the form is called, with the associated yield handling in images.txp.

Certainly doable within broad parameters (I’m happy to follow the status quo), but it adds another layer of fuss to the template to service a diminishing number of users. It won’t be long before all major browsers support sizes=“auto”. If some never do, it’s not a deal-breaker – the images load at full size, or from the src (which is not mandatory if srcset is available). If the site owner wants to support everything, their web developer would change the template accordingly.

Should I use sizes="auto" (or omit the sizes attribute as its the same thing), or (simplified)
sizes="auto<txp:evaluate>, <txp:yield name="sizes" /></txp:evaluate>" and 2 shortcode (or output_form) instances of <txp::images sizes="parameters" etc />?

To get the yield to work I’d need something like this as a enclosing tag in images.txp: <txp:images id='<txp:yield name="id "/>' sizes='<txp:yield name="sizes "/>' limit='<txp:yield name="limit "/>' etc >// image code</txp:images>. There must be a simpler approach…

Offline

Board footer

Powered by FluxBB