0
function rate_preprocess_rate_template_emotion(&$variables) {
extract($variables);
$buttons = array();
foreach ($links as $link) {
$button = theme('rate_button', $link['text'], $link['href'], 'rate-emotion-btn');
$button .= $link['votes'];
$buttons[] = $button;
}
$variables['buttons'] = $buttons;
$info = array();
........
이제 주위에 <br/><span class="pollunm">
을 추가하고 싶습니다. 이 코드를 내 테마 template.php
에 넣습니다. 그러나 span 태그를 출력하지 않습니다.왜 덮어 쓰기에 출력이 없습니까?
function mytheme_preprocess_rate_template_emotion(&$variables) {
$link['votes']='<br/><span class="pollunm">'.$link['votes'].' </span>';
}
테마는 'mytheme'입니까? 'mytheme'을 테마가 호출 된 곳으로 변경하지 않습니다 (테마 폴더의 .info 파일). 관리자의 '성능'섹션에서 캐시 된 데이터를 삭제 했습니까? –
yeap, 테마 파일은 mytheme이고 캐시를 지 웠습니다. – zhuanzhou
은 정말 _before_rate_preprocess_rate_template_emotion()이라고하는 mytheme_preprocess_rate_template_emotion()입니까? – gpilotino