I need some help with reading a tv value from a parent document and have phx say if value="PRIVATE" to redirect the page.
What I have in mind is this
[+phx:if=`[*parent*]`:is=`[[AuthorID]]`:if=`[*tvPRIVATE*]`:is=`PRIVATE`:then=`[[redirect]]`:else=``+]
if [*parent*] is 10 and the [*tvPRIVATE*] value is equal to PRIVATE then use the [[redirect]] snippet, else allow to continue.
I want to allow a user to control access to a page that they created and all child pages. I have the snippet working in the parent document with [*tvPRIVATE:is=`PRIVATE`:then=`[!redirect!]`*] which works well but I want the child documents to read this value and redirect if the parent is set to redirect. I hope that makes sense!
Thanks alot! That worked exactly as I needed.
For some reason this isn’t working on further tests lol.
For some reason that no matter what the tvPRIVATE value is, it’s using the redirect snippet.
[+phx:if=`[*parent*]`:is=`[*createdby*]`:and:if=`[*tvPRIVATE*]`:is=`PRIVATE`:then=`[[redirect]]`:else=``+]
I have tried
[+phx:if=`[*parent*]`:is=`434`:and:if=`[*tvPRIVATE*]`:is=`PRIVATE`:then=`2`:else=`1`+]
The parent of the document is 434 as shown and the output on the page is 1 when it should be 2.
This works on the parent page [*tvPRIVATE:is=`PRIVATE`:then=`[!redirect!]`*] and if the tv is checked the redirect snippet works... how do I get that to work in the child document but take the tvPRIVATE value from the parent. I have tried using text and checkbox for the tvPRIVATE option type but this made no difference.
I have this placeholder [*phx:input=`[+myplaceholder+]`:AuthorPrivateProfile*] showing a custom field in my database and on a users page it shows up with the correct value. How can I use this placeholder but in Ditto to list all profiles and for each listed page it will show the [*phx:input=`[+myplaceholder+]`:AuthorPrivateProfile*] value. It works on the users page as I said but I can’t seem to get it working in Ditto. I made a simple Ditto Tpl and put [*phx:input=`[+myplaceholder+]`:AuthorPrivateProfile*] in there to repeat for each listed page but it’s not getting the value from the pages.
Thanks
OK I’m getting everything working how I should now! I need some help with this Phx call though. I want to get this working but with member groups as well.
This works but I want to add and is not a member of `members`
[+phx:if=`[+view.privateprofile+]`:is=`PRIVATE`:and:isnot:``:then=``:else=`my code`+]
This doesn’t
[+phx:if=`[+view.privateprofile+]`:is=`PRIVATE`:and:isnot:mo=`members`:then=``:else=`my code`+]
I didn’t realize you could nest phx holders, this has opened up all new ideas for me now... I have phx and webloginPE working together to create expensive profiles with public or private permissions.
Thanks AHHP!