How do I make a node.tpl.php file that is only used by the front page in Drupal 7
Tag : drupal , By : Lord Zantor
Date : March 29 2020, 07:55 AM
wish of those help I believe you are looking for something like the below. This uses the template_preprocess_node function, and this code belongs in your active theme's template.php file: function YOURTHEME_preprocess_node ( &$vars ) {
if ($vars["is_front"]) {
$vars["theme_hook_suggestions"][] = "node__front";
}
}
|
Drupal 7 add block of text to front page
Date : March 29 2020, 07:55 AM
I wish this help you The easiest way would be to create a region in your theme and then put a block into that region only on the home page. In mytheme.info: ...
regions[front] = Front Page Text
...
echo render($page['front']);
|
Drupal 7 front page URL after changing the front page
Tag : drupal , By : Sinisa Ruzin
Date : March 29 2020, 07:55 AM
Any of those help As far as I know the original homepage is equal to /node (for clean URLs) or ?q=node. Link to either of these and you should be fine.
|
Adding PHP code to Drupal Page for adding Javascript
Date : March 29 2020, 07:55 AM
I hope this helps . This is more typically handled via a custom module or theme function. But assuming this is being put into a field on a node your code should work. The issue is likely a text format setting. Assuming this is Drupal 7, you can go to /admin/config/content/formats. I assume you are using PHP format. So you will want to inspect the settings for this format and make sure the PHP filter is enabled.
|
Drupal - How do I block (eliminate access) content in front page from anonymous user
Date : March 29 2020, 07:55 AM
should help you out In Drupal 7, go to people and then the permissions tab, here you can deselect 'View published content' for anonymous users.
|