1
我試圖通過將標籤封裝在一個然後樣式中來顯示我的標籤之間的文本。我如何在Drupal7的主菜單中的<a></a>標籤內插入<span></span>標籤
我已將以下函數添加到我的template.php文件中,但我在前端看不到任何區別。跨度只是不出現。 (我清除了我的緩存)
我使用正確的功能嗎?我究竟做錯了什麼?
function my_theme_link($variables) {
return '<a href="' . check_plain(url($variables['path'], $variables['options'])) . '"' . drupal_attributes($variables['options']['attributes']) . '><span>' . ($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])) . '</span></a>';
}