[SOLVED]Help with styling page_info and pagination links

hi all,
I’m trying to style the pagination links and page_info text on pages with listed items. Though, I’ve been a bit successful with the pagination, I’ve noticed that the html wrappers on the page_info are somewhat inconsistent, making it difficult to apply styling to them. on some pages, they are wrapped in <tr>, on some they are sitting at the buttom of the page without wrappers. is there a way to modify the php function that generates these items?

for pagintion I already tried modifying some lines from function smartyPageLinks in PKPTemplateManager.inc.php, like so:

OPENING tag
BEFORE MOD       $value = '';
         if ($page>1) {

AFTER MOD    $value = '';
        $value .= '<ul class="pagination">';
       if ($page>1) {

CLOSING tag
BEFORE MOD    }
          return $value;

AFTER MOD    }
        $value .= '</ul>';
        return $value;

But this seemed to have no effect. I’d appreciate to be pointed in the right direction.

In OJS 2.4.x, PKPTemplateManager::smartyPageLinks() has been overridden by TemplateManager::smartyPageLinks().

The code only differs by the way in which the request object is called, so I don’t think it should be overridden.

Try deleting the TemplateManager::smartyPageLinks() function. I’m going to open a PR to do the same.

Are you planning on wrapping each of the <a> tags in <li>s?

thanks @ctgraham for the prompt reply as always.

yes please, I want to wrap the <a> tags in <li>s. (I think they already are)
then the page_info (1 - 25 of 29 items), I plan on wrapping in <p>s, as they have no links.

There aren’t any <li>s in 2.4.8, so that may be a local modification on your part.

The pull request I opened is attached to this issue: smartyPageLinks() function is duplicated · Issue #1318 · pkp/pkp-lib · GitHub

you’re right, my apologies. my “PKPTemplateManager.inc.php” already has those modifications based on a “PKPTemplateManager.inc.php” someone shared in this forum.

I’m now left with function smartyPageInfo(). how do I wrap in <p> tags?
it has

return __('navigation.items', array(
'from' => ($to===0?0:$from),
'to' => $to,
'total' => $itemTotal
));

The __() function performs localization / translation, returning the ‘navigation.items’ phrase in the appropriate language, with the ‘from’, ‘to’, and ‘total’, variables replaced in-line.

An example call of this function in smarty is:

		<td colspan="4" align="left">{page_info iterator=$users}</td>

I think you’ll just want to append and prepend your <p> tags as strings in the smartyPageInfo() function itself.

thanks for all the help.
problem is now solved.
for the function smartyPageInfo(), I returned

'<p class="page-num">' . __('navigation.items', array(
'from' => ($to===0?0:$from),
'to' => $to,
'total' => $itemTotal
)) . '</p>';

not very tidy :), but it got the job done. thanks again.