Follow

How to Mark Pages as Protected in a Sampler Edition

For page protection, you can either implement via the hook HOOK_pugpig_atom_page_access($node) or by using a list field with the name ‘field_pugpig_page_access’.

The hook should return a string value of 'free' or 'protected' (or null).
 
For example:
<?php
function {MODULE_NAME}_pugpig_atom_page_access($node) {
return ($node->type === 'article') ? 'protected' : 'free';
}
?>
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk