Skip to main content
fixed grammar
Source Link
Gnuget
  • 1.1k
  • 6
  • 14

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //in thishere put any condition to you want, for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** preprocess_page **/
function your_module_preprocess_page(&$vars) {

  //in thishere put any condition to you want, for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** preprocess_page **/
function your_module_preprocess_page(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //here put any condition to you want, for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** preprocess_page **/
function your_module_preprocess_page(&$vars) {

  //here put any condition to you want, for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.

typo
Source Link
Gnuget
  • 1.1k
  • 6
  • 14

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** Implementation of hook_init **/ function your_module_preprocess_page(&$vars) {

/** preprocess_page **/
function your_module_preprocess_page(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** Implementation of hook_init **/ function your_module_preprocess_page(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** preprocess_page **/
function your_module_preprocess_page(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.

Source Link
Gnuget
  • 1.1k
  • 6
  • 14

Create a custom module and put this lines there:

/** Implementation of hook_init **/
function yourmodule_init(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    global $custom_theme;
    $custom_theme = 'new-theme'; //setting a new theme for this domain.
    init_theme();
  }
}

Also you can avoid create a whole new theme creating only a new page.tpl.php and using it.

/** Implementation of hook_init **/ function your_module_preprocess_page(&$vars) {

  //in this put any condition to you want for example a domain
  $url = url("<front>", array('absolute' => TRUE));
  if( $url == "http://mydomainiframe.com") {
    $vars['template_file'] = 'page-iframe'; //setting a new page template
  }
}

And the page-iframe.tpl.php will be used instead of the page.tpl.php of your theme, in this way you can reuse things to you have in your actual theme.