Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-09-18 03:51:32

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

Lack of global theme association vs all other sections on logout

Currently, there is an annoying behavior with the multiple themes support: when you are login-in, the current theme works fine as expected (perfectly); but if you’re logout the sections associated with an another theme can be displayed (with all elements associated: js, styles etc.). IMHO, The theme support could gain to be stronger protected against all other themes.


Patrick.

Github | CodePen | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2019-09-18 08:05:05

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

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

Unless we’re thinking at cross-purposes, this is a feature.

Logged-in users can test the currently-assigned dev theme in complete isolation (well, as long as you’re careful not to change shared components) and regular site visitors are not affected.

You can demonstrate your new site theme to clients if they log in and switch to the dev theme.

You can make changes to any dev theme without it affecting anybody and then – when you’re happy – switch your current Sections to the new theme in one go to make the changes live.

Am I missing something?


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

#3 2019-09-18 08:57:37

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

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

Bloke wrote #319312:

[…] Am I missing something?

Hi Stef ;)

Let’s create a test section associated to a theme (not the current one for public users): you can see the new theme (the /test page) in development even if you’re not login-in…


Patrick.

Github | CodePen | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#4 2019-09-18 09:17:56

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

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

Pat64 wrote #319313:

Let’s create a test section associated to a theme (not the current one for public users): you can see the new theme (the /test page) in development even if you’re not login-in…

Sure, you can do that if you want now. The current implementation allows you to assign the dev theme to any Section you like and make it ‘live’. See the multi-edit options in the Presentation->Sections panel.

But think of the downsides:

  • You have no content assigned to the newly created test Section.
  • Thus you need to create fake content (articles, images, …) and assign them to the test Section so you and your clients can see the new theme in action.
  • It doesn’t appear in your navigation so you need to faff with the URL or change your live nav to include the test section inside conditionals.
  • When you’re done testing, you need to remove all the fake content and the test Section.
  • If you don’t want to do this in the live site, you’re then faced with creating a Staging server. That brings with it all the hassle of having to set it up, clone the database, grant access, etc. And when you’re done, migrate all the content that might have changed in the interim back to your Live server. Kinda negates the point of themes as you could just do it all on the Staging server and copy the Pages/Forms/Styles across when done.

With the system set up as it is, the new theme can be demonstrated using all your existing content. No staging server. No fuss. Just log in and boom your new theme is visible and usable as a playground without having to do any additional work. And, crucially, nobody else is affected while development is ongoing.

Heck, you can even clone your existing theme and make a few variants. Say to your client… do you prefer Theme A (demo it) or … visit admin side, change working theme, flick back to live site and refresh… Theme B?

We really did put a lot of thought into the Theme implementation to not only bring theming to Textpattern (finally!) but also to improve the general workflow of how to iterate and revamp sites with minimal hassle :) As far as I know, very few other CMSs (if any) take this approach to allowing parallel development on a Live site in a (relatively) safe environment, so I’d be reticent to alter it.

Last edited by Bloke (2019-09-18 09:19:46)


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

#5 2019-09-18 11:04:26

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

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

Bloke wrote #319314:

With the system set up as it is, the new theme can be demonstrated using all your existing content. No staging server. No fuss. Just log in and boom your new theme is visible and usable as a playground without having to do any additional work. And, crucially, nobody else is affected while development is ongoing.

Heck, you can even clone your existing theme and make a few variants. Say to your client… do you prefer Theme A (demo it) or … visit admin side, change working theme, flick back to live site and refresh… Theme B?

My question is: “Does the excellent feature for showing a theme for only loginin users can shown the /test section if you access it from its URL (by everyone)?”

We really did put a lot of thought into the Theme implementation to not only bring theming to Textpattern (finally!) but also to improve the general workflow of how to iterate and revamp sites with minimal hassle :) As far as I know, very few other CMSs (if any) take this approach to allowing parallel development on a Live site in a (relatively) safe environment, so I’d be reticent to alter it.

Sure! That why I’m loving so much how Textpattern CMS handle the theming feature compared to all other CMSs.

Last edited by Pat64 (2019-09-18 11:05:07)


Patrick.

Github | CodePen | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#6 2019-09-18 12:54:23

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

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

Pat64 wrote #319315:

My question is: “Does the excellent feature for showing a theme for only loginin users can shown the /test section if you access it from its URL (by everyone)?”

Hi Patrick,

when you create a new section, you assign it a public theme, so it’s visible for everyone. It will also be your current dev theme, until you change it on Sections list tab. I agree that can be misleading when you create a section to test a dev theme. We probably could duplicate Uses theme/page/style select boxes on individual section tab to add dev versions. Dunno how it would feel UX-wise, though.

Offline

#7 2019-09-18 12:55:17

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

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

Pat64 wrote #319315:

“Does the excellent feature for showing a theme for only loginin users can shown the /test section if you access it from its URL (by everyone)?”

Yes. If you assign your in-development theme to the test Section and then Deploy to live it from the multi-edit, anyone can view it with that theme, logged-in or not.


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

#8 2019-09-18 15:15:38

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

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

But… If we don’t want everyone can access.

My problem is this one: I use a “maintenace theme” for everyone during my development process but I can access to sections (with the in development theme) when I’m logged out.

I suposed that a theme could intercept all sections associated to an another theme to show only the current one (activated) for everyone.

Never mind, Stef: it is just to report the behavior.


Patrick.

Github | CodePen | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#9 2019-09-18 15:27:08

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

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

Pat64 wrote #319319:

But… If we don’t want everyone can access.

Well, now I’m confused! You want everyone to be able to see the new theme in test when they’re logged out, but you don’t want everyone to access it?

*scratches head*

So you set every Section of the site to use this Maintenance Theme and make it live? Thus, everyone gets this theme regardless of whether they’re logged in or out. You log in, make some changes to a dev theme. Anyone who logs in can see your new theme. Anyone who is not logged in continues to see the Maintenance Theme.

Now, what do you want to show to whom instead?


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

#10 2019-09-18 18:15:06

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

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

Sorry Stef if I didn’t well explain.

As I said previously, I use a theme for public visitors. This theme is attached to the default and error_default pages only. All works fine! The visitors view the current theme (Theme A).

I’m working on a new theme (Theme B). Only loginin users can see it when we use —as recommanded— the “Preview Theme” link. It’s perfect! I created a page associated to a test section (note this new section isn’t part of the theme A for the visitors).

When I’m logged out I can see the /test page.

My mistaken: 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).

Last edited by Pat64 (2019-09-18 18:17:24)


Patrick.

Github | CodePen | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB