Drupal - Replace Home Page

Hi Anyway, to stop viewing the Drupal homepage and redirecting to my specific html page?

Thanks you

+3
source share
2 answers

If you have a specific HTML page that is hosted and not created from Drupal, the easiest way is to use Drupal goto.

How to do it? open your .php template and search for the page_preprocess function, it should look like this:

YOURTHEME_preprocess (& $ variables, $ hook) {
  if (drupal_is_front_page ()) {
      drupal_goto ('yoursite.com/yourpage.html')
  }
}

change YOURTHEME to the name of your theme and clear the cache.

: HTML ? , , ... , .

+3

Drupal 7 - front.tpl.php

page.tpl.php, , , :

modules/system/page.tpl.php

( , ):

sites/all/themes/my_theme

:

my_theme.info
templates/html.tpl.php
templates/page/page--front.tpl.php
templates/node/node.tpl.php
templates/block/block.tpl.php
css/style.css

, , .

+5

Source: https://habr.com/ru/post/1775942/


All Articles