Quantcast

catch error on include macro

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

catch error on include macro

Gerritjan Koekkoek-2
I'm using: {{include document="xxxx.yyy"/}} quite a lot.

When using it on a page where the current user has not the rights to view I get velocity error box!


Is it possible to give the user some hint instead of the error:


Like: "To read the complete content of this page you need to login!" with a link to Login...


Gerritjan Koekkoek
Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
Visit our website<http://www.cdlsworld.org>
Facebook<https://www.facebook.com/gerritjan.koekkoek>
email<[hidden email]>



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: catch error on include macro

vmassol
Administrator
Hi,

> On 20 Mar 2017, at 13:08, Gerritjan Koekkoek <[hidden email]> wrote:
>
> I'm using: {{include document="xxxx.yyy"/}} quite a lot.
>
> When using it on a page where the current user has not the rights to view I get velocity error box!
>
>
> Is it possible to give the user some hint instead of the error:
>
>
> Like: "To read the complete content of this page you need to login!" with a link to Login…

This is not related to logging in or not… It’s related to not having view rights on the page… You can prevent some users or groups from having view rights on any page/children even if the user is logged in.

Now if you’re on page that shouldn’t work if the user is not logged in (because it includes another page for which the user doesn’t have view rights), then it probably means you have some wrong permissions set for the current page and it should probably not be viewable by the user.

Thanks
-Vincent

> Gerritjan Koekkoek
> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
> Visit our website<http://www.cdlsworld.org>
> Facebook<https://www.facebook.com/gerritjan.koekkoek>
> email<[hidden email]>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: catch error on include macro

Gerritjan Koekkoek-2


Verstuurd vanaf mijn iPhone

> Op 20 mrt. 2017 om 13:17 heeft Vincent Massol <[hidden email]> het volgende geschreven:
>
> Hi,
>
>> On 20 Mar 2017, at 13:08, Gerritjan Koekkoek <[hidden email]> wrote:
>>
>> I'm using: {{include document="xxxx.yyy"/}} quite a lot.
>>
>> When using it on a page where the current user has not the rights to view I get velocity error box!
>>
>>
>> Is it possible to give the user some hint instead of the error:
>>
>>
>> Like: "To read the complete content of this page you need to login!" with a link to Login…
>
> This is not related to logging in or not… It’s related to not having view rights on the page… You can prevent some users or groups from having view rights on any page/children even if the user is logged in.
>
> Now if you’re on page that shouldn’t work if the user is not logged in (because it includes another page for which the user doesn’t have view rights), then it probably means you have some wrong permissions set for the current page and it should probably not be viewable by the user.
>
This assumption is not always true. This page has text that can be Viewed by guest and included a page that can/should not be viewed...
In particular it should work to convince the reading user to consider login or registration and login. The velocity error will probably have the opposite effect...

> Thanks
> -Vincent
>
>> Gerritjan Koekkoek
>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
>> Visit our website<http://www.cdlsworld.org>
>> Facebook<https://www.facebook.com/gerritjan.koekkoek>
>> email<[hidden email]>
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: catch error on include macro

vmassol
Administrator

> On 20 Mar 2017, at 15:44, Gerritjan Koekkoek <[hidden email]> wrote:
>
>
>
> Verstuurd vanaf mijn iPhone
>
>> Op 20 mrt. 2017 om 13:17 heeft Vincent Massol <[hidden email]> het volgende geschreven:
>>
>> Hi,
>>
>>> On 20 Mar 2017, at 13:08, Gerritjan Koekkoek <[hidden email]> wrote:
>>>
>>> I'm using: {{include document="xxxx.yyy"/}} quite a lot.
>>>
>>> When using it on a page where the current user has not the rights to view I get velocity error box!
>>>
>>>
>>> Is it possible to give the user some hint instead of the error:
>>>
>>>
>>> Like: "To read the complete content of this page you need to login!" with a link to Login…
>>
>> This is not related to logging in or not… It’s related to not having view rights on the page… You can prevent some users or groups from having view rights on any page/children even if the user is logged in.
>>
>> Now if you’re on page that shouldn’t work if the user is not logged in (because it includes another page for which the user doesn’t have view rights), then it probably means you have some wrong permissions set for the current page and it should probably not be viewable by the user.
>>
> This assumption is not always true. This page has text that can be Viewed by guest and included a page that can/should not be viewed...
> In particular it should work to convince the reading user to consider login or registration and login. The velocity error will probably have the opposite effect…

This is something specific to you and you could implement it using a velocity macro and using an #if (and only do the include if the condition is true).

Thanks
-Vincent

> Thanks
>> -Vincent
>>
>>> Gerritjan Koekkoek
>>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
>>> Visit our website<http://www.cdlsworld.org>
>>> Facebook<https://www.facebook.com/gerritjan.koekkoek>
>>> email<[hidden email]>

Loading...