I would like to create a Home view (the principal page of the site) without any type of content like news. The problem is that when I create a view, I don't see any way to hide the content.

I have tried to put the number of items to 0, but this loads all contents. How can I create a home page without any content?

My Drupal version is 7

  • 1
    Question is, why you need to have views page in this case?? Views without content is possible when you have got exposed filters and checked options that required input data. – lamp5 Mar 20 '18 at 12:02
  • Is there another way to create a page without views? – albert Mar 20 '18 at 12:04
  • Yes... You can use panels, nodes, hook_menu() and whatever you want. – lamp5 Mar 20 '18 at 12:07
  • So, it would get the structure of page.tpl.php but it will not show content. – albert Mar 20 '18 at 12:29
  • The question makes no sense, why you would create a view if you don't want to show anything in it? I think you want to ask how to create a page in Drupal 7, I'm right? – Ziftman Mar 20 '18 at 13:49

Instead of dealing with Views just copy the page.tpl.php file of your theme to page--front.tpl.php and do whatever you want with it. In particular you can comment out the <?php print render($page['content']); ?> and replace with any code you need.

| improve this answer | |
  • the problem with this solution is that I have one block in content. One idea is to copy the bloc code in the content part. I don't know if it is a good idea – albert Mar 20 '18 at 12:46
  • It's not really clear what you are trying to achieve and what your problem is. Try to edit the original post and provide all the possible details, describe the problem itself thoroughly instead of adding new details in the comments. – AltaGrade Mar 20 '18 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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