а как индекс то переименовать в 6 ом?

Главные вкладки

Аватар пользователя Dope Skeeza Dope Skeeza 12 марта 2008 в 22:59

Перепробовал обозвать шаблон так:
maintenance-page.tpl.php
page.tpl.php
page-СВОЁ НАЗВАНИЕ.tpl.php и указать путь в меню "О САЙТЕ"
Но не пашет =\ У меня должен быть совсем другой дизайн на индексе сайта, а вот примастырить его не получается Sad
Как это починить?)

Комментарии

Аватар пользователя Akzhan Akzhan 12 марта 2008 в 23:12

исходя из кода:

<?php
/**
* Choose which template file to actually render. These are all suggested
* templates from themes and modules. Theming implementations can occur on
* multiple levels. All paths are checked to account for this.
*/
function drupal_discover_template($paths, $suggestions, $extension = '.tpl.php') {
global $theme_engine;

// Loop through all paths and suggestions in FIFO order.
$suggestions = array_reverse($suggestions);
$paths = array_reverse($paths);
foreach ($suggestions as $suggestion) {
if (!empty($suggestion)) {
foreach ($paths as $path) {
if (file_exists($file = $path .'/'. $suggestion . $extension)) {
return $file;
}
}
}
}
}
?>

<?php

/**
* Process variables for node.tpl.php
*
* Most themes utilize their own copy of node.tpl.php. The default is located
* inside "modules/node/node.tpl.php". Look in there for the full list of
* variables.
*
* The $variables array contains the following arguments:
* - $node
* - $teaser
* - $page
*
* see node.tpl.php
*/
function template_preprocess_node(&$variables) {
$node = $variables['node'];
...
// Clean up name so there are no underscores.
$variables['template_files'][] = 'node-'. $node->type;
}

?>

надо либо свой тип у главной страницы/узла, либо немного править тему.

Это если с первого взгляда.

Аватар пользователя Akzhan Akzhan 12 марта 2008 в 23:22

второй взгляд... для phpTemplate-тем можно расширить
<?php
/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars) {
?>

для корректной настройки template_files.