Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-04-18 21:39:56

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 143
Website

collection of questions

  • When I was recently upgrading my site, I replaced the line <link rel="stylesheet" ... css.php ... > with a direct reference to a file and lost the original Textpattern source code line (yes, dumb). Can someone remind me what it should be?
  • Related to above, is there somewhere that I can see the source code (meaning pages, forms, &c) for the most recent default ‘theme’ or website, so I can learn best practices?
  • For an article listing, excerpts in Textile are surrounded by <p>, while non-Textile excerpts are not. The various excerpts thus appear different, due to <p> styling. (Also, didn’t it used to be true that text inside <div> without <p> wasn’t strictly kosher HTML?) Is there a way to force consistency?
  • Way back when, I thought it was a good idea to add visible RSS & Atom links to each page. There are also RSS & Atom <txp:feed_link> references in the <head> of every single page on my site. Should I just haul all this stuff out? Googling reveals that they are supposedly making a comeback, but since I’ve never used either, I don’t understand what benefit they have to me.

Offline

#2 2024-04-19 02:57:59

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,081
Website

Re: collection of questions

skewray wrote #337106:

When I was recently upgrading my site, I replaced the line <link rel="stylesheet" ... css.php ... > with a direct reference to a file and lost the original Textpattern source code line (yes, dumb). Can someone remind me what it should be?

<txp:css format="link" media="" />

Or check the documentation to see more fine-tuning that is possible.

Related to above, is there somewhere that I can see the source code (meaning pages, forms, &c) for the most recent default ‘theme’ or website, so I can learn best practices?

In the /textpattern/setup folder (or the same location in the downloaded zip for Textpattern 4.8), you will find the /themes/four-point-eight folder containing the default templates for the theme. (or you can go to the demo site textpattern.co/demo and check both the public side and visit the demo admin side and find the default pages and forms).

For an article listing, excerpts in Textile are surrounded by <p>, while non-Textile excerpts are not. The various excerpts thus appear different, due to <p> styling. (Also, didn’t it used to be true that text inside <div> without <p> wasn’t strictly kosher HTML?) Is there a way to force consistency?

Textile automatically wraps a block (paragraph) in <p> tags; for non-Texile blocks, you can add them your self. Textpattern will leave them alone and render them.

Way back when, I thought it was a good idea to add visible RSS & Atom links to each page. There are also RSS & Atom <txp:feed_link> references in the <head> of every single page on my site. Should I just haul all this stuff out? Googling reveals that they are supposedly making a comeback, but since I’ve never used either, I don’t understand what benefit they have to me.

That is up to you… You might not use it, but other people do use RSS/Atom feeds to keep track when sites are updated (using a feed reader). It cost nothing to keep that in place (bear in mind that browsers don’t have a build-in mechanism to render a feed or to display an icon when a feed is available – it is a good idea to keep the RSS or Atom links visible in the page, as you have now.


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

Offline

#3 2024-04-19 06:50:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,273
Website GitHub

Re: collection of questions

For point 3, you can also use the escape attribute escape="p" to strip the paragraph tags out and then add them (or not) in your template, for consistency.

HTML is more forgiving now. Bare divs with content is fine, as far as I am aware.


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

#4 2024-04-19 17:26:39

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 143
Website

Re: collection of questions

Thank you, both. I think my original site installation was built on a Txp default site predating the <txp:css> tag.

I did notice that the w3 css validator drops warnings over the <txp:feed_link tag>, since the output ends in />. Also same warnings over <br />, generated by unsorted lists. I guess this is an HTML5 vs xhtml thing.

Offline

#5 2024-04-19 18:30:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,273
Website GitHub

Re: collection of questions

skewray wrote #337109:

I did notice that the w3 css validator drops warnings over the <txp:feed_link tag>, since the output ends in />.

If memory serves this will be fixed in 4.9.0 because jakob kindly patched it for us.


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

Board footer

Powered by FluxBB