Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-06-13 01:17:37

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Force a section to use a page?

Can this be done?

I’ve just worked on another CMS where I could force the page to display using a second template using a query string (?template=newpage).

For example you could have the page set to use a holding page to the public, but send the url to the client with the query string and he would see the actual site.

Offline

#2 2012-06-13 05:24:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Force a section to use a page?

soo_if_frontpage and glx_if should be of help unless you want to deconstruct a set of conditionals


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2012-06-13 05:39:49

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: Force a section to use a page?

Hey colak – thanks for the reply – I know it can be done in other ways…. but just adding a query string with the required page just seems, logical (to me)

Offline

#4 2012-06-13 06:24:32

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 590
Website

Re: Force a section to use a page?

Since you can delegate an entire page template to a single form or group of forms, that’s what I’d do. Use adi_gps to handle the query string. Then call the desired form based on the name in the query string.

Offline

#5 2012-06-13 07:05:06

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Force a section to use a page?

This kinda works in the messy mode: ...?id=1&s=public will use the page template associated with the section public to display the article.

Offline

#6 2012-06-13 10:18:26

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Force a section to use a page?

etc wrote:

This kinda works in the messy mode: ...?id=1&s=public will use the page template associated with the section public to display the article.

That’s a bug which allows off-loading articles in different page templates, by-passing any page template code. It has been fixed in r3759 (TXP v4.5.0).

Last edited by Gocom (2012-06-13 10:24:22)

Offline

#7 2012-06-13 11:41:25

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

Re: Force a section to use a page?

IIRC you can force a section, or just an url-word as pseudo-section, to use a page template using gbp_permanent_links.

Last edited by jakob (2012-06-13 11:42:33)


TXP Builders – finely-crafted code, design and txp

Offline

#8 2012-06-13 12:36:24

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Force a section to use a page?

Gocom wrote:

That’s a bug which allows off-loading articles in different page templates, by-passing any page template code. It has been fixed in r3759 (TXP v4.5.0).

Will then be possible to somehow protect an entire section with <txp:password_protect />? Sorry for off-topic.

Offline

#9 2012-06-13 19:41:22

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Force a section to use a page?

etc wrote:

Will then be possible to somehow protect an entire section with <txp:password_protect />? Sorry for off-topic.

If that is the only issue that allows by-passing template code, then yes, you could use tags as <txp:password_protect /> with confidence just by placing such tag/code to a section’s page template.

Offline

Board footer

Powered by FluxBB