페이지 넘버 관련

페이지 넘버 관련

QA

페이지 넘버 관련

답변 2

본문


<nav class="pg_wrap">
<span class="pg">
</span>
</nav>

 

위 코드에서 "renew" 클래스값을 주려고 합니다.

/lib/common.lib.php

위 페이지에서


// 페이징 코드의 <nav><span> 태그 다음에 코드를 삽입
function page_insertbefore($paging_html, $insert_html)
{
    if(!$paging_html)
        $paging_html = '<nav class="pg_wrap"><span class="pg"></span></nav>';
 
    return preg_replace("/^(<nav[^>]+><span[^>]+>)/", '$1'.$insert_html.PHP_EOL, $paging_html);
}
 
// 페이징 코드의 </span></nav> 태그 이전에 코드를 삽입
function page_insertafter($paging_html, $insert_html)
{
    if(!$paging_html)
        $paging_html = '<nav class="pg_wrap"><span class="pg"></span></nav>';
 
    if(preg_match("#".PHP_EOL."</span></nav>#", $paging_html))
        $php_eol = '';
    else
        $php_eol = PHP_EOL;
 
    return preg_replace("#(</span></nav>)$#", $php_eol.$insert_html.'$1', $paging_html);
}

여기에 renew 를 적어줬는데도 적용이 안되서요 ..

페이지 넘버 부분에 클래스값 추가하려면 어느 페이지에 넣어줘야 할까요 ?

이 질문에 댓글 쓰기 :

답변 2

function get_paging($write_pages, $cur_page, $total_page, $url, $add="")

위 함수에 적용해보세요. 같은 파일에서 올려주신 함수 윗 부분에 있을 겁니다.

return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";

답변을 작성하시기 전에 로그인 해주세요.
전체 4
© SIRSOFT
현재 페이지 제일 처음으로