Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2019-09-18 20:18:38

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Lack of global theme association vs all other sections on logout

Pat64 wrote #319321:

I thought a public theme (Theme A: the live theme) is protected from any other access to a new one (Theme B) even if a new section isn’t part of the public theme (Theme A: the only one activated for public visitors).

FWIW, themes assets are pages, styles and forms. Sections are not part of theme, there is no mean to protect a section from the public access via themes. Moreover, there is no global theme, they are set individually for each section. You can, however, attach two themes to each section: one public and one dev.

When you create a new section and choose a theme, it becomes both public and dev for this section. Thus, in your case you should:

  1. choose Theme A and default page/style when creating test section, to serve “work in progress” to the visitors
  2. then switch its dev version to Theme B, modifying the page/style if needed

Offline

#12 2019-09-22 11:59:17

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Re: Lack of global theme association vs all other sections on logout

Absolutly, you’re right Oleg!

All sections need to be attached to (all) themes.


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

#13 2019-09-22 21:15:37

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Lack of global theme association vs all other sections on logout

Pat64 wrote #319348:

All sections need to be attached to (all) themes.

I’m not so sure. Some sections (say plugins) can use special forms (say file_download) that are not required in other sections. Hence a theme suitable for plugins articles is not necessary pertinent for other sections and vice versa.

Offline

#14 2019-09-30 18:40:11

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Lack of global theme association vs all other sections on logout

Now there is a global theme switcher in dev branch on Themes tab, but I have not found better text strings than Preview for dev theme and View for live theme.

Offline

#15 2019-09-30 21:29:08

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Re: Lack of global theme association vs all other sections on logout

Wahoo!

Nice: I’m going to test it.


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

#16 2019-10-01 19:46:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,760
Website

Re: Lack of global theme association vs all other sections on logout

etc wrote #319458:

I have not found better text strings than Preview for dev theme and View for live theme.

Okay, I sorta see what this does. View sets the live theme for all Sections if the section has the same Page and CSS name as the new theme. If not, it leaves it as it was.

This is a nice way to set all Sections to the theme without having to reassign them from the multi-edit tool. My only reservation is it’s potentially destructive (to non-logged-in users). Just a stray finger on View instead of Preview and your site runs the chosen theme on the public side. The multi-edit gives you a confirmation step, which is safer.

So, two options, either separately or combined:

  1. Make the wording of the links more explanatory so the admin knows the severity of the ‘View’ action. Both are (sort of) easily undone with multi-edit but ‘View’ doesn’t really cut it in terms of what the effect is. It seems too benign. Will get my thinking cap on for a better word.
  2. When clicking on View, show a confirmation dialog asking if they’re damn sure they want to set this theme live for all Sections with matching Page and Stylesheet names.

Which is better / doable? Or both?

EDIT: How about using link names Dev and Live? Or Make live?

Last edited by Bloke (2019-10-01 19:49:02)


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

#17 2019-10-01 21:32:19

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Lack of global theme association vs all other sections on logout

Bloke wrote #319467:

EDIT: How about using link names Dev and Live? Or Make live?

That would be surely better, but they are not in [skin] section. The only alternative string I’ve found is active. We probably should make strings separation less granular.

Adding a confirmation dialogue is quite easy.

Offline

#18 2019-10-01 22:30:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,760
Website

Re: Lack of global theme association vs all other sections on logout

etc wrote #319468:

That would be surely better, but they are not in [skin] section. We probably should make strings separation less granular.

We could move those two strings to the [admin-side] section. That’s what it’s for. We made the language strings more granular to try and improve performance with language table string loading per page, as it was getting out of hand. Though we may need to revisit it when we do multi-lingual public side content.


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

#19 2019-10-02 08:48:51

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Lack of global theme association vs all other sections on logout

Bloke wrote #319471:

We could move those two strings to the [admin-side] section.

Batch strings move is beyond my skills, I leave it with Phil if the wording seems clear. A basic warning is in dev now.

Offline

#20 2019-10-02 11:44:13

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Re: Lack of global theme association vs all other sections on logout

Good point for the warning message. But IMHO, only for the “View” link because it’s kind of a definitive change.


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

Board footer

Powered by FluxBB