Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
Re: Can I make some pages password protected?
Try putting this where appropriate:
<txp:password_protect login="client" pass="password" />
Offline
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
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
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) orname
(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
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