請問是否有模組可以套用 讓選單變成有底圖的 或是直接用按鈕取代原來的文字 目前的選單功能 只能呈現文字 顯的有點單調
請教一下 是否有這種模組 或是需要修改模板 懇請告知!
事業一定爭取,對您從未放棄!
好像沒有這種模組(怪...)
有一個改版型檔案的方法,不過,熟悉 CSS 一定是必要的: http://drupal.org/node/110199
我去看過了~~不過他所提到要加入的程式碼 好像怪怪的 我是找到正確的語法了
<?phpfunction phptemplate_menu_links($items, $type = 'ul') { if (!empty($items)) { $output .= "<$type>"; foreach ($items as $link) { $active = ''; if ($_GET['q'] == $link['href']) { $active = ' class="active"'; } $output .= "<li$active>\n"; // Is the title HTML? $html = isset($link['html']) && $link['html']; // Initialize fragment and query variables. $link['query'] = isset($link['query']) ? $link['query'] : NULL; $link['fragment'] = isset($link['fragment']) ? $link['fragment'] : NULL; if (isset($link['href'])) { $output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html); } else if ($link['title']) { //Some links are actually not links, but we wrap these in <span> for adding title and class attributes if (!$html) { $link['title'] = check_plain($link['title']); } $output .= '<span'. drupal_attributes($link['attributes']) .'>'. $link['title'] .'</span>'; } $output .= "</li>\n"; } $output .= "</$type>"; } return $output;}?>
不過這樣似乎是改變primary_links 但我發現我想要改的是導覽的選單 不知道要加入什麼 才能達成?
這是CSS設計的問題... hmm... 買本CSS的書來看,或是看看既有drupal theme的code,繪有幫助 -- from open mind to open source~
Re: 選單問題
事業一定爭取,對您從未放棄!
Re: 選單問題
好像沒有這種模組(怪...)
有一個改版型檔案的方法,不過,熟悉 CSS 一定是必要的:
http://drupal.org/node/110199
Re:
我去看過了~~不過他所提到要加入的程式碼 好像怪怪的
我是找到正確的語法了
<?phpfunction phptemplate_menu_links($items, $type = 'ul') {
if (!empty($items)) {
$output .= "<$type>";
foreach ($items as $link) {
$active = '';
if ($_GET['q'] == $link['href']) {
$active = ' class="active"';
}
$output .= "<li$active>\n";
// Is the title HTML?
$html = isset($link['html']) && $link['html'];
// Initialize fragment and query variables.
$link['query'] = isset($link['query']) ? $link['query'] : NULL;
$link['fragment'] = isset($link['fragment']) ? $link['fragment'] : NULL;
if (isset($link['href'])) {
$output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html);
}
else if ($link['title']) {
//Some links are actually not links, but we wrap these in <span> for adding title and class attributes
if (!$html) {
$link['title'] = check_plain($link['title']);
}
$output .= '<span'. drupal_attributes($link['attributes']) .'>'. $link['title'] .'</span>';
}
$output .= "</li>\n";
}
$output .= "</$type>";
}
return $output;
}
?>
不過這樣似乎是改變primary_links
但我發現我想要改的是導覽的選單
不知道要加入什麼
才能達成?
Re: 選單問題
這是CSS設計的問題... hmm... 買本CSS的書來看,或是看看既有drupal theme的code,繪有幫助
from open mind to open source~
--