I cant get it to workoh dear
![]()
im using friendly urls
i have made the TV
i have made a page called admin, the url to the page is like thus, mysite.com/admin
in the content section of this page i am putting [!DocPassword!]
and in the template variabe i am typing test which will be the password
when i go to the page mysite.com/admin the url changes to mysite.com/2?unauthid=11 (11 is the id of the admin page) 2 is the default error page
What am i doing wrong?
I should point out that @INHERIT does work (natively via MODx), however the SESSION compare code will need one or more additional checks to check by parent. I will see if I can get an example put together...

There has to be a way to get all the children to accept the parent’s password authentication (without re-entering it for every child!). How???
Good stuff though, just want I was looking for.



As stated in the snippet code, you have to place [!DocPassword!] in your document you wish to protect.
I’ve placed "[!DocPassword? &redirect=`[*id*]`!]" within the targeted page/template.
5. Place DocPassword snippet call on pages you wish to protect: [!DocPassword!]
I can’t get it to work. I have done the following:
I’ve created the snippet and called it "DocPasswordTV".
1. I’ve created my "unauthorized page" and defined it in my configuration settings and placed the snippet " [!DocPassword? &redirect=`[*id*]`!]" in my soon to be secured page.
2. I’ve created the Template Variable "DocPasswordTV" with the following settings:
I’ve placed "[!DocPassword? &redirect=`[*id*]`!]" within the targeted page/template. In the TV input i’ve defined my password:
Then I test my page and no loginform appears. Just my page with sensitive information.
Where did I lost track of the installation procedure? Is it in the TV settings?