Changing Pagination style CSS

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Plewsy
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Jul 02, 2008 7:08 am

Changing Pagination style CSS

Postby Plewsy » Fri Aug 01, 2008 11:24 pm

Can anyone help, I am in the final stages of a site design, but I have a couple of issues still to iron out... with regards to styling... I am using 1.5

I need to be able to style the pagination, I am at a loss of how to do this...

http://jason-plews.com/joomla/page.html For example of what I am tring to do

I would like to apply a css style to the < Prev and Next > page naviagaion, and have the naviagaion align to the left of the page...

Secondly I would also like to style the pagination in a different way, using CSS to style the numbers and Gifs for the Beggining, prev, next, and End...

I know how to write the CSS but can not see how I appy it the these elements, this is the css for the pagination numbers

#page_numbers a:link, a:visited {
color: #FF0099;
background-color: #FFFFFF;
padding-top: 2px;
padding-right: 4px;
padding-bottom: 2px;
padding-left: 4px;
font-family: Arial, Helvetica, sans-serif, "Arial Black";
text-decoration: none;
font-size: 9px;
}


#page_numbers a:hover, active {
color: #FFFFFF;
background-color: #FF0099;
padding-top: 2px;
padding-right: 4px;
padding-bottom: 2px;
padding-left: 4px;
}

I have the same problem with the "Buttonheaders" i.e PDF, Print and Emal... How do I change the positioning...

Any advice would be most appriciated

Jason

User avatar
raulbcordoba
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Mon Aug 28, 2006 5:32 pm

Re: Changing Pagination style CSS

Postby raulbcordoba » Sat Aug 02, 2008 10:03 am

Hi Jason,

You may want to use some chrome for that?

I recommend you to look inside "beez" template, look for html/pagination.php

That's a chrome to tweak the pagination. Feel free to create your own one.

Best.

User avatar
adnet23
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 193
Joined: Tue Jul 18, 2006 4:31 am
Location: New York, NY, USA

Re: Changing Pagination style CSS

Postby adnet23 » Mon May 11, 2009 6:08 am

This whole concept confuses me because im not a coder. Will you explain to me how to use chrome to style pagination. I look at the beez file but I dont understand it.

Code: Select all

<?php
/**
 * @version      $Id: pagination.php 10381 2008-06-01 03:35:53Z pasamio $
 * @package      Joomla
 * @copyright   Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
 * @license      GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * This is a file to add template specific chrome to pagination rendering.
 *
 * pagination_list_footer
 *    Input variable $list is an array with offsets:
 *       $list[limit]      : int
 *       $list[limitstart]   : int
 *       $list[total]      : int
 *       $list[limitfield]   : string
 *       $list[pagescounter]   : string
 *       $list[pageslinks]   : string
 *
 * pagination_list_render
 *    Input variable $list is an array with offsets:
 *       $list[all]
 *          [data]      : string
 *          [active]   : boolean
 *       $list[start]
 *          [data]      : string
 *          [active]   : boolean
 *       $list[previous]
 *          [data]      : string
 *          [active]   : boolean
 *       $list[next]
 *          [data]      : string
 *          [active]   : boolean
 *       $list[end]
 *          [data]      : string
 *          [active]   : boolean
 *       $list[pages]
 *          [{PAGE}][data]      : string
 *          [{PAGE}][active]   : boolean
 *
 * pagination_item_active
 *    Input variable $item is an object with fields:
 *       $item->base   : integer
 *       $item->link   : string
 *       $item->text   : string
 *
 * pagination_item_inactive
 *    Input variable $item is an object with fields:
 *       $item->base   : integer
 *       $item->link   : string
 *       $item->text   : string
 *
 * This gives template designers ultimate control over how pagination is rendered.
 *
 * NOTE: If you override pagination_item_active OR pagination_item_inactive you MUST override them both
 */

function pagination_list_footer($list)
{
   // Initialize variables
   $lang =& JFactory::getLanguage();
   $html = "<div class=\"list-footer\">\n";

   $html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>";
   $html .= $list['pageslinks'];
   $html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";

   $html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"".$list['limitstart']."\" />";
   $html .= "\n</div>";

   return $html;
}

function pagination_list_render($list)
{
   // Initialize variables
   $lang =& JFactory::getLanguage();
   $html = "<ul class=\"pagination\">";

   $html .= $list['start']['data'];
   $html .= $list['previous']['data'];

   foreach( $list['pages'] as $page )
   {
      if($page['data']['active']) {
         // $html .= '<strong>';
      }

      $html .= $page['data'];

      if($page['data']['active']) {
         //  $html .= '</strong>';
      }
   }

   $html .= $list['next']['data'];
   $html .= $list['end']['data'];
   // $html .= '&#171;';

   $html .= "</ul>";
   return $html;
}

function pagination_item_active(&$item) {
   return "<li><strong><a href=\"".$item->link."\" title=\"".$item->text."\">".$item->text."</a></strong></li>";
}

function pagination_item_inactive(&$item) {
   return "<li>".$item->text."</li>";
}
?>
Free Software Support for the design community: tang3d[dot]com
website development news: developsis[dot]com


Return to “Templates for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 3 guests