5 years ago
2
Topic

Hi

the url variable restriction plugin can't retrieve the catid value in a content view with the sef mode activated. did you know this ?

Please put a form inside a content view. on one field on this form use the url variable restriction plugin and set it as catid= xx (where xx is the category of the main content)


if you deactivate the SEF settings the restriction plugin can retrieve the catid value. if the sef is on, it can't anymore.

thanks

cyril

Get a Book for SEBLOD
5 years ago
0
Level 1

Hi

the workaround I found is to use the SQL restriction field (https://www.seblod.com/store/extensions/19162)  with such a query:

SELECT IF( (SELECT catid FROM #__content where id=$uri->get('id'))=XXX , 1,0)

where XXX is the catid to check.

then if the current content belongs to such a category the restriction applies or not

thanks

cyril

4229 Posts
Kadministrator
5 years ago
0
Level 1

URL restriciton plugin can only get what is in the URL, when you are viewing article there is normally no catid in the url.

Get a Book for SEBLOD