18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Node Access<br />

Creating the role access module<br />

We begin with the standard module .info file and a stub .module file, as<br />

shown below:<br />

; $Id$<br />

name = Role Access<br />

description = Limit content access by user role.<br />

core = 7.x<br />

files[] = role_access.module<br />

Save this as role_access.info inside a /sites/default/modules/role_access/<br />

directory.<br />

Then create a stub role_access.module file:<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!