Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2015-06-22 11:18:05

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Textpattern themes: a plan

Sorry, I’ve missed something; what about the file name conventions? Is that what we should use?

  • Theme
    • Pages
      • abc_theme.default.txp
    • Forms
      • abc_theme.default.article.txp

Last edited by NicolasGraph (2015-06-22 11:19:55)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#86 2015-06-22 11:27:52

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

Re: Textpattern themes: a plan

NicolasGraph wrote #291790:

what about the file name conventions?

I was thinking more like:

  • themes
    • abc_theme
      • pages
        • default.txp
        • about.txp
      • forms
        • article.default.txp
        • misc.footer.txp
        • section.layout.txp
      • styles
        • cobalt.css
    • smd_theme
      • pages
        • elastic.txp
      • forms
        • article.default.txp

Deletion is then a simple case of removing the theme’s folder (after unassigning the theme assets from your Sections of course, or things’ll get messed up on your public site).

EDIT: .css extension for Stylesheets, duh.

Last edited by Bloke (2015-06-22 18:37:27)


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

#87 2015-06-22 11:34:48

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern themes: a plan

I’m with Stef on this one. That is the directory structure I would want.

Offline

#88 2015-06-22 11:38:00

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Textpattern themes: a plan

philwareham wrote #291784:

Later today when I put the branch back on Textpattern’s GitHub repo – will let you know.

OK missed this – downloaded the latest from Github but its no different from before. Using 4.6dev on TXP Tips for access to the txp:author tag, so happy to give this a testing once you update on Github.

Offline

#89 2015-06-22 11:40:06

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Textpattern themes: a plan

I’d like to also point out to TXP fans out there that the grass is not necessarily greener on the other side. I wasted hours this morning on my wife’s Tumblr site trying to figure out why a paid theme did not load her Twitter feeds. She uses Tumblr because its easy to add content, but its not easy to change anything and the theme author’s help page leads to a 404.

Offline

#90 2015-06-22 11:56:32

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Textpattern themes: a plan

Bloke wrote #291791:

I was thinking more like:

  • Themes
    • abc_theme
      • Pages
        • default.txp
        • about.txp
      • Forms
        • article.default.txp
        • misc.footer.txp
        • section.layout.txp
      • Styles
        • cobalt.txp
    • smd_theme
      • Pages
        • elastic.txp
      • Forms
        • article.default.txp

Deletion is then a simple case of removing the theme’s folder (after unassigning the theme assets from your Sections of course, or things’ll get messed up on your public site).

Great, even easier than I thought. I didn’t know if same form names in different themes could cause problems with the db.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#91 2015-06-22 11:58:29

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

Re: Textpattern themes: a plan

NicolasGraph wrote #291796:

I didn’t know if same form names in different themes could cause problems with the db.

They will today, but if we introduce a new ‘theme’ column and set it up properly, then multiple themes can use the same Form name without issue.


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

#92 2015-06-22 12:01:19

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern themes: a plan

Or we can not use the database at all?

Offline

#93 2015-06-22 12:05:28

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Textpattern themes: a plan

Bloke wrote #291797:

They will today, but if we introduce a new ‘theme’ column and set it up properly, then multiple themes can use the same Form name without issue.

Ok, thanks. It is also nice to use the form type as a prefix to sort the forms.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#94 2015-06-22 12:06:28

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

Re: Textpattern themes: a plan

philwareham wrote #291798:

Or we can not use the database at all?

That too. But see here.


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

#95 2015-06-22 12:07:38

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

Re: Textpattern themes: a plan

NicolasGraph wrote #291799:

Ok, thanks. It is also nice to use the form type as a prefix to sort the forms.

Yeah, I like that too. It might be even better if we get to define our own Form types as well :-) But then again, it might not work with themes as that would imply creating Types on the fly when a theme is installed.


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

#96 2015-06-22 12:15:56

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Textpattern themes: a plan

Bloke wrote #291791:

I was thinking more like:

  • Themes
    • abc_theme
      • Pages
        • default.txp
        • about.txp
      • Forms
        • article.default.txp
        • misc.footer.txp
        • section.layout.txp
      • Styles
        • cobalt.txp

Here’s how the default 4.6 theme looks like:

/home/www/textpattern.dev/_templates/default_4.6-dev
├── forms
│   ├── article_listing.article.html
│   ├── comment_form.comment.html
│   ├── comments.comment.html
│   ├── comments_display.comment.html
│   ├── default.article.html
│   ├── files.file.html
│   ├── images.misc.html
│   ├── plainlinks.link.html
│   ├── popup_comments.comment.html
│   ├── search_input.misc.html
│   └── search_results.article.html
├── pages
│   ├── archive.html
│   ├── default.html
│   └── error_default.html
└── style
│ ├── default.css
│ └── ie8.css

3 directories, 16 files

As for the extension, I settled on .html because of the automatic syntax highlighting in editors. You could use .txp and add specific txp:tags to the editor’s available languages if you so desire. Now if Type becomes part of Themes, then the above forms listing would have default.html instead of default.article.html.

I’ve been using Textpattern for many years, there are things in the backend that I’ve never used, like article form preview, or the tag builder, or form type as I’ve pointed out here. As TXP moves forward, if certain legacy features pose a dilemma, a mental roadblock, then my vote is for ctrl-x.

Offline

Board footer

Powered by FluxBB