Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-07-07 08:45:21

John-Paul F
Member
Registered: 2021-03-15
Posts: 39
Website Twitter

Can I make some pages password protected?

I have a video I want to show only to a client.

They specifically asked if I can put it on my site and password-protect it.

Is there a plug-in for that, or other built-in mechanism?

Thank you in advance!


Strictly Amateur

Offline

#2 2021-07-07 09:31:01

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

Re: Can I make some pages password protected?

Try putting this where appropriate:

<txp:password_protect login="client" pass="password" />

Offline

#3 2021-07-07 09:53:46

John-Paul F
Member
Registered: 2021-03-15
Posts: 39
Website Twitter

Re: Can I make some pages password protected?

etc wrote #330911:

Try putting this where appropriate:

<txp:password_protect login="client" pass="password" />...

Wow, thank you for the quick reply. Does that go within the text of the particular article?


Strictly Amateur

Offline

#4 2021-07-07 11:35:41

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

Re: Can I make some pages password protected?

You usually put the tag in your template to protect an entire page or section, but it could go in an article (careful of Textile!) if you wanted to wrap a particular part of it for eyes-only after someone is prompted for the password. See the tag documentation for more.

Incidentally, if your client has a login to Textpattern (e.g. you might give them a Managing Editor login) then you can also use the if_logged_in tag around content you want to remain private. That will only show to authenticated users and you can go more granular down to group (role) or name (user) level if you want to get super specific.

Another advantage of giving your client a Textpattern login is that you can take advantage of the development workflow so if you ever need to iteratively alter your site, just duplicate your current live Theme, assign the cloned theme to any sections as a development lane, and then you can make changes to the dev assets while the rest of genpop remain blissfully unaware of your meddling on the live site. Only you and logged-in users can see the work in progress until you’re ready to deploy to live via one multi-edit option.


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 2021-07-07 13:12:33

John-Paul F
Member
Registered: 2021-03-15
Posts: 39
Website Twitter

Re: Can I make some pages password protected?

Bloke wrote #330914:

Incidentally, if your client has a login to Textpattern (e.g. you might give them a Managing Editor login) then you can also use the if_logged_in tag around content you want to remain private. That will only show to authenticated users and you can go more granular down to group (role) or name (user) level if you want to get super specific.

That’s so helpful (as ever), thank you.
I’d completely forgotten that I can let visitors be users of my site. It’s something I have rarely needed to do, except for Txp wizards who can help redesign it…


Strictly Amateur

Offline

#6 2022-07-14 02:55:06

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

Re: Can I make some pages password protected?

etc wrote #330911:

Try putting this where appropriate:

<txp:password_protect login="book" pass="xpriTT" />...

i created a page called private. i put that code in.
visiting the page causes a popup prompting for id and password. But no luck in signing in.

what am i missing?

PS i am using latest TxP. 4.8.8

Last edited by bici (2022-07-14 21:40:45)


…. texted postive

Offline

Board footer

Powered by FluxBB