I have the Content access module installed, but it's not good for sorting this. I just want to make it so deny access is not denied on frontpage.

In permissions I have de-selected view publish content for anonymous users, but how can I make it so they can view the front page?

1 Answer 1


As long as they don't have permission to view content, and as long as your template file(s) say print render($page['content']) then they should be denied access.

However, you could do something like this:

  1. Make a custom template file called page--front.tpl.php inside your theme's folder
  2. Copy the contents of page.tpl.php to that file
  3. Alter the new page--front.tpl.php file so that it either doesn't render any content anywhere (including the sidebars), or make it so it only renders the content to logged in users.


<?php if (user_is_anonymous()): ?>
  <?php print t('Hello. This is where you would normally see content.'); ?>
<?php else: ?>
  <?php print render($page['content']); ?>
<?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.