Ventrian Product Forums

We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.
Subject: Negative role tokens: ISNOTINROLE, ISAGENTNOTINROLE
Prev Next
You are not authorized to post a reply.

Page 1 of 212 > >>
Author Messages
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

11/21/2008 9:12 AM  

I need to display information if a user is not in a role:

For example I need to display two different search results, one set for a registered user (not subscribed) and one for a registered paid-up (subscribed) user:

[ISNOTINROLE:XXX]

My Template (REGISTERED BUT NOT SUSCRIBED ROLES)

[/ISNOTINROLE:XXX]

 

OR, for the subscribed user

 

[ISINROLE:XXX]

My Template (REGISTERED AND SUBSCRIBED ROLES)

[/ISINROLE:XXX]

 

Would like this functionality to be added to all relevant sections, such as search, listings, views, etc.

Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

11/21/2008 9:26 AM  

Sorry this is in the wrong section, should be under Property Agent if you can move it?

Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


11/24/2008 6:26 AM  
I've moved the thread.

I can add in these tokens.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


11/27/2008 6:48 AM  
Can you try the latest release? It has [ISNOTINROLE:XXX][/ISNOTINROLE:XXX]

Scott McCulloch
Site Administrator
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

11/27/2008 12:58 PM  

Hi Scott,

Did a quick test and it worked great (I only tested it for the LISTING template though). Thanks very much for a prompt response.

By the way, I know logging out and back into DNN to test different behaviours for different roles is time consuming, so perhaps other members will be interested in this quick identity switcher which makes it a lot quicker when doing development where functionality is role dependent- see it here


Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

11/27/2008 9:43 PM  

Just done a more comprehensive test using two different users, one with an assigned role 1Subscriber and one without.

I used the following in each template file:

[ISINROLE:1Subscriber]I am a subscriber[/ISINROLE:1Subscriber]
[ISNOTINROLE:1Subscriber]I am NOT a subscriber[/ISNOTINROLE:1Subscriber]

My users were:

Test_Not_Subscribed = NOT in role 1Subscriber

Test_Subscribed = IS in role 1Subscriber

 

I have highlighted the results below where the behaviour is not as expected.

 

LISTING TEMPLATE

Test_Not_Subscribed: I am NOT a subscriber (<= Works OK)

Test_Subscribed: I am a subscriber (<= Works OK)

OPTIONS TEMPLATE

Test_Not_Subscribed: I am NOT a subscriber (<= Works OK)

Test_Subscribed: I am a subscriber I am NOT a subscriber (<= NOT OK!)

VIEW TEMPLATE

Test_Not_Subscribed: Just sends me back to the search page, I cannot view the property at all (<= NOT OK!)

Test_Subscribed: I am a subscriber (<= Works OK)

SEARCH TEMPLATE

Test_Not_Subscribed: I am a subscriber I am NOT a subscriber (<= NOT OK!)

Test_Subscribed: I am a subscriber I am NOT a subscriber (<= NOT OK!)

MESSAGE TEMPLATE

Test_Not_Subscribed: I am a subscriber I am NOT a subscriber (<= NOT OK!)

Test_Subscribed: I am a subscriber I am NOT a subscriber (<= NOT OK!)

 

Hopefully that will allow you to debug it fairly quickly.

 

Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


11/27/2008 9:46 PM  
I only added it to process property item which is the listing and view templates.

Scott McCulloch
Site Administrator
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

11/28/2008 2:16 AM  

I think it needs to be added to the above templates to provide maximum flexibility.

Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

12/03/2008 3:01 PM  

Sorry to be a pain, but if you've added to the LIST template for specific roles, would it be possible to add it to the MESSAGE template ASAP since if you customise the LIST view for a role you also need to customise the MESSAGE view in case a result is not found.

Regards.

Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


12/04/2008 7:02 AM  
Yes, I will put it in the next release.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


1/06/2009 4:56 AM  
When you say it didn't work in the view template, I think your user didn't have the "view detail" permission in edit permissions rather than a product of ISNOTINROLE.


Scott McCulloch
Site Administrator
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

1/06/2009 6:09 AM  
Quite right, disregard my comment about the view template having a bug in it.
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


1/06/2009 6:34 AM  
I'm just posting a release now with these fixes in it.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


1/06/2009 6:41 AM  
Can you try the latest build? (just posted)

Scott McCulloch
Site Administrator
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

1/07/2009 1:17 AM  
Just done a quick test and all seems to work ok for all the remplates I listed above. Thanks so much for that. Happy New Year.
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

4/09/2009 2:29 AM  

Sorry to dig this one up again. Did you ever add ISAGENTNOTINROLE? Now I need to differentiate content based on if an agent is subscribed.

Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


4/09/2009 8:01 AM  
No only ISAGENTINROLE, but I can add it in the next release.

Scott McCulloch
Site Administrator
Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

4/09/2009 9:12 AM  

Thanks. That would be greatly appreciated if you can do it in the next release.

Richard CookUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:81

4/20/2009 11:53 AM  
Hi Scott,

Sorry to bother you with this again but will token ISAGENTNOTINROLE be added soon?

Regards,
Richard
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


4/21/2009 7:24 AM  
I'll put a reminder in, still working in some more features

Scott McCulloch
Site Administrator
You are not authorized to post a reply.
Page 1 of 212 > >>

Forums > Modules > Property Agent > Negative role tokens: ISNOTINROLE, ISAGENTNOTINROLE



ActiveForums 3.7
We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.