2013-05-14 3 views
0

안녕하세요, 저는 "t ('Older Posts') '및't ('Newer Posts')에 html을 추가하려고합니다."가능한가요? 나는 그것을 이해할 수있다 ???? 나는 Drupal 6 template.php 파일에있다. 나는 아래의 전체 기능에 위치한이 지점에서 위를 교체해야Drupal 6의 t()에 html 추가 template.php?

<a href="" class="action"><span>Newer Posts</span></a> 
<a href="" class="action back"><span>Older Posts</span></a> 

-

이것은 내가 HTML로 추가하려고하고있는 코드는? 이것은 내가 많은 것을 시도하고 아무것도 아직 작동하지 않았다 가능한 경우

t('Older Posts') 
t('Newer Posts') 

나는

function theme_views_mini_pager($tags = array(), $limit = 10, 
$element = 0, $parameters = array(), $quantity = 9) {  
global $pager_page_array, $pager_total; 

// Calculate various markers within this pager piece: 
// Middle is used to "center" pages around the current page. 
$pager_middle = ceil($quantity/2); 
// current is the page we are currently paged to 
$pager_current = $pager_page_array[$element] + 1; 
// max is the maximum page number 
$pager_max = $pager_total[$element]; 
// End of marker calculations. 


$li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : 
t('Older Posts')), $limit, $element, 1, $parameters); 
if (empty($li_previous)) { 
$li_previous = "&nbsp;"; 
} 

$li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('Newer Posts')), 
$limit,$element, 1, $parameters); 
if (empty($li_next)) { 
$li_next = "&nbsp;"; 
} 

if ($pager_total[$element] > 5) { 
$items[] = array(
    'class' => 'action back pager-previous', 
    'data' => $li_previous, 
); 

$items[] = array(
    'class' => 'action pager-next', 
    'data' => $li_next, 
); 
return theme('item_list', $items, NULL, 'ul', array('class' => 'pager')); 
} 
} 

내가 알아 내려고 노력하고 있어요이

t('<a href="" class="action back"><span>Older Posts</span></a>') 
t('<a href="" class="action"><span>Newer Posts</span></a>') 

전체 기능 같은 것을 만들려면 .

+0

사용할 수 있습니다에 ** HTTP : //drupal.stackexchange.com/** – mate64

답변

0

당신은이 질문과 관련이

$link = '<a href="" class="action back"><span>' . t('Older Posts') . '</span></a>'; 

또는

$link = t('!link_startOlder Posts!link_end', array(
    '!link_start' => '<a href="" class="action back"><span>', 
    '!link_end' => '</span></a>', 
));