Есть блок в правом сайдбаре в котором кнопки стоят ниже чем надо и проблема оказывается не в стилях не могу найти переменную $sale или же $client
Вот код, походу там за div вышла кнопка
в template.php ничего нету вроде вот код
<?php
/**
* Sets the body-tag class attribute.
*
* Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
*/
function phptemplate_body_class($left, $right) {
if ($left != '' && $right != '') {
$class = 'sidebars';
}
else {
if ($left != '') {
$class = 'sidebar-left';
}
if ($right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="'. $class .'"';
}
}
/**
* Return a themed breadcrumb trail.
*
* param $breadcrumb
* An array containing the breadcrumb links.
* return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars) {
$vars['tabs2'] = menu_secondary_local_tasks();
//check if you are on the correct page first
if(strpos($_SERVER['REQUEST_URI'], 'taxonomy/term/') !== FALSE) {
unset($vars['title']); //$vars['title'] contains page title, $vars['head_title'] contains title for the <title> tag
}
// Hook into color.module
if (module_exists('color')) {
_color_page_alter($vars);
}
}
/**
* Add a "Comments" heading above comments except on forum pages.
*/
function garland_preprocess_comment_wrapper(&$vars) {
if ($vars['content'] && $vars['node']->type != 'forum') {
$vars['content'] = '<h2 class="comments">'. t('Comments') .'</h2>'. $vars['content'];
}
}
/**
* Returns the rendered local tasks. The default implementation renders
* them as tabs. Overridden to split the secondary tasks.
*
* ingroup themeable
*/
function phptemplate_menu_local_tasks() {
return menu_primary_local_tasks();
}
/**
* Returns the themed submitted-by string for the comment.
*/
function phptemplate_comment_submitted($comment) {
return t('!datetime — !username',
array(
'!username' => theme('username', $comment),
'!datetime' => format_date($comment->timestamp)
));
}
/**
* Returns the themed submitted-by string for the node.
*/
function phptemplate_node_submitted($node) {
return t('!datetime — !username',
array(
'!username' => theme('username', $node),
'!datetime' => format_date($node->created),
));
}
/**
* Generates IE CSS links for LTR and RTL languages.
*/
function phptemplate_get_ie_styles() {
global $language;
$iecss = '<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . path_to_theme() .'/fix-ie.css" />';
if ($language->direction == LANGUAGE_RTL) {
$iecss .= '<style type="text/css" media="all">import "'. base_path() . path_to_theme() .'/fix-ie-rtl.css";</style>';
}
return $iecss;
}
function test_theme(&$existing, $type, $theme, $path)
{
$hooks = phptemplate_theme($existing, $type, $theme, $path);
$hooks['comment_form'] = array('arguments' => array('form' => NULL));
return $hooks;
}
function test_comment_form($form)
{
unset ($form['homepage']);
return drupal_render($form);
}
function test_preprocess_node(&$vars) {
// Send a new variable, $has_terms, to see wether the current node has any terms
$vars['has_terms'] = count(taxonomy_node_get_terms($vars['node'])) > 0;
$vars['inlineblock'] = theme('blocks', 'inlineblock');
return $vars;
/**
* Sets the body-tag class attribute.
*
* Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
*/
function phptemplate_body_class($left, $right) {
if ($left != '' && $right != '') {
$class = 'sidebars';
}
else {
if ($left != '') {
$class = 'sidebar-left';
}
if ($right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="'. $class .'"';
}
}
/**
* Return a themed breadcrumb trail.
*
* param $breadcrumb
* An array containing the breadcrumb links.
* return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars) {
$vars['tabs2'] = menu_secondary_local_tasks();
//check if you are on the correct page first
if(strpos($_SERVER['REQUEST_URI'], 'taxonomy/term/') !== FALSE) {
unset($vars['title']); //$vars['title'] contains page title, $vars['head_title'] contains title for the <title> tag
}
// Hook into color.module
if (module_exists('color')) {
_color_page_alter($vars);
}
}
/**
* Add a "Comments" heading above comments except on forum pages.
*/
function garland_preprocess_comment_wrapper(&$vars) {
if ($vars['content'] && $vars['node']->type != 'forum') {
$vars['content'] = '<h2 class="comments">'. t('Comments') .'</h2>'. $vars['content'];
}
}
/**
* Returns the rendered local tasks. The default implementation renders
* them as tabs. Overridden to split the secondary tasks.
*
* ingroup themeable
*/
function phptemplate_menu_local_tasks() {
return menu_primary_local_tasks();
}
/**
* Returns the themed submitted-by string for the comment.
*/
function phptemplate_comment_submitted($comment) {
return t('!datetime — !username',
array(
'!username' => theme('username', $comment),
'!datetime' => format_date($comment->timestamp)
));
}
/**
* Returns the themed submitted-by string for the node.
*/
function phptemplate_node_submitted($node) {
return t('!datetime — !username',
array(
'!username' => theme('username', $node),
'!datetime' => format_date($node->created),
));
}
/**
* Generates IE CSS links for LTR and RTL languages.
*/
function phptemplate_get_ie_styles() {
global $language;
$iecss = '<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . path_to_theme() .'/fix-ie.css" />';
if ($language->direction == LANGUAGE_RTL) {
$iecss .= '<style type="text/css" media="all">import "'. base_path() . path_to_theme() .'/fix-ie-rtl.css";</style>';
}
return $iecss;
}
function test_theme(&$existing, $type, $theme, $path)
{
$hooks = phptemplate_theme($existing, $type, $theme, $path);
$hooks['comment_form'] = array('arguments' => array('form' => NULL));
return $hooks;
}
function test_comment_form($form)
{
unset ($form['homepage']);
return drupal_render($form);
}
function test_preprocess_node(&$vars) {
// Send a new variable, $has_terms, to see wether the current node has any terms
$vars['has_terms'] = count(taxonomy_node_get_terms($vars['node'])) > 0;
$vars['inlineblock'] = theme('blocks', 'inlineblock');
return $vars;
Комментарии
Например вот так:
style.css, строка 73
.views-field-view-node img {
float: right;
margin-top: -60px;
}
Благодарю! даже в голову такая простая мысль не приходила)
А если размер страницы измениться не уйдёт ли кнопка ? По - моему здесь ещё надо relative позиционирование