Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2018-01-10 08:29:19

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,172
Website

Re: Textpattern themes: a plan

Agree. A simple, clean approach.

Bloke wrote #308604:

If it bothers people, we can add an exception to the tag so that it translates ‘skin’ into ‘theme’ so the nicer name can be used.

It’s no bother for those in the know but it something that would need explaining in the docs, in the forum etc. themes_root (or themes_base_path), theme_path and theme (or theme_name) would be obvious.

phiw13 wrote #308606:

One question on this: When looking at the Preference panel > Admin I see we now have two entries: Themes base path with (default) value: /Users/user/Sites/_txp472/themes and skin_dir with value themes.

Does that mean I could have different locations on the file system ? Or is the first entry now obsolete pending removal?

That would interest me too.


TXP Builders – finely-crafted code, design and txp

Offline

#170 2018-01-10 09:21:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,520
Website GitHub

Re: Textpattern themes: a plan

jakob wrote #308608:

themes_root (or themes_base_path), theme_path and theme (or theme_name) would be obvious.

Yeah. I was trying to avoid the use of ‘path’ in a way because it’s not a path (as in file path) but couldn’t think of anything better so went with it. We could certainly tweak the names to remove references to ‘skin’. I think that’d be better.

phiw13 wrote #308606:

two entries: Themes base path … and skin_dir

Log out and back in again. The old one will get purged on login.


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

#171 2018-01-10 09:31:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,520
Website GitHub

Re: Textpattern themes: a plan

Okay, changed it slightly:

<txp:page_url type="images_root" />
<txp:page_url type="themes_root" />
<txp:page_url type="theme_path" />
<txp:page_url type="theme" />

Outputs:

https://example.org/images
https://example.org/themes
https://example.org/themes/some-theme-name
some-theme-name

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

#172 2018-01-10 09:54:38

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

Re: Textpattern themes: a plan

Good stuff! Tag change needs documenting, so can you please raise and issue in docs repo so I don’t forget. Cheers Stef!

Offline

#173 2018-01-10 11:33:29

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,172
Website

Re: Textpattern themes: a plan

Excellent. Thanks Stef!


TXP Builders – finely-crafted code, design and txp

Offline

#174 2018-01-10 12:01:53

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,474
Website

Re: Textpattern themes: a plan

Bloke wrote #308609:

Log out and back in again. The old one will get purged on login.

Done and gone! (should have thought about that…)

Also, updated type strings are certainly better.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#175 2018-03-10 16:22:02

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 379
Website

Re: Textpattern themes: a plan

Just discovered the the 4.7 beta and Phil’s plans for the Bootstrap 4 framework as a Textpattern theme, because I was looking at how to implement Bootstrap on my sites. I’m incredibly excited about this. Hollering on the sidelines!


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#176 2018-05-07 23:53:25

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,371
Website GitHub Mastodon

Re: Textpattern themes: a plan

Bloke wrote #308610:

Okay, changed it slightly:

<txp:page_url type="images_root" />...

Outputs:

https://example.org/images...

Did this ever get implemented? I can’t seem to get it to work in Beta.3.

Offline

#177 2018-05-08 00:07:55

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,474
Website

Re: Textpattern themes: a plan

michaelkpate wrote #311631:

Did this ever get implemented? I can’t seem to get it to work in Beta.3.

It certainly works here (TXP 4.7dev, though).

<txp:page_url type="images_root" /> outputs: http://example.local/images – note the lack of a / at the end.

images is the folder specified in the Preferences -> Admin


Where is that emoji for a solar powered submarine when you need it ?

Offline

#178 2018-05-08 01:20:14

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,371
Website GitHub Mastodon

Re: Textpattern themes: a plan

phiw13 wrote #311632:

It certainly works here (TXP 4.7dev, though).

<txp:page_url type="images_root" /> outputs: http://example.local/images – note the lack of a / at the end.

I figured it out. I was confusing site_url and page_url.

<script src="<txp:site_url />themes/patetech/assets/js/functions.js"></script>
<script src="<txp:page_url type="theme_path" />/assets/js/functions.js"></script>

Offline

Board footer

Powered by FluxBB