1

I'm a Drupal noob and inherited a Drupal website to maintain. The site has a custom theme, which includes a "page--front.tpl.php" that Drupal loads as the front page. Within this script, there is the following call:

<?php print render($page['content']); ?>

This call used to display homepage-view.tpl.php (found under themes//), but I upgraded some modules and changed some settings in an attempt to fix some problems and now it appears to be showing all nodes, (there is a pager for /node?page=X in the section rendered by that print statement).

My guess is that $page['content'] is returning /node. Either /node pointed to homepage--view.tpl.php before or $page['content'] returned the value of homepage--view.tpl.php. Either way, how can I get the old behavior back?

Thanks in advance.

1 Answer 1

0

$page[content] returns the content for the current page, whatever that may be. If a view is set at the content, it would return the view, or a node, or a block in the content region or anything else set to show in that region, either through the UI or programmatically. It returns rendered html for all elements in that region.

Chances are under blocks, that view? is no longer listed to render in the main content region as a result of whatever setting changes you made.

If it's a view and set as a block you can modify it under the blocks page, block configuration to show in the region.

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.