Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 10:46 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
Posted: Wed Feb 27, 2008 7:11 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Nov 02, 2007 12:50 am
Posts: 13
I have a joomla 1.5 site with some menu items with the category blog layout. I would like to know if and how to make the navigation page numbers at the bottom of the page also appear at the top just above the blog entries, so you dont have to scroll all the way to the bottom just to go to a different page.
Also, is there a way to make it so that when you click "next", it moves over by a group of pages instead of just the very next page number. It seems kind of a waste to click next and just move over one page when 10 page numbers are listed and you can just click on the page you want to go to, unless it is more than 10 pages away that is.

Thanks so much!!


Top
  E-mail  
 
Posted: Thu Feb 28, 2008 3:45 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Dec 15, 2007 3:02 pm
Posts: 363
Location: Washington DC Metro
You can change the placement of the navigation page numbers (and add more to the top of the page layout) by creating a template override.

For instance, if you want to change the appearance of the page number links on the Article Category Blog layout (with the default sample data, this is the "The News" item in the Main Menu), you will make a copy of joomla_root/components/com_content/views/category/tmpl/blog.php and save it as joomla_root/templates/your_template/html/com_content/category/blog.php.

Next open the file you just created and look for
Code:
<?php echo $this->pagination->getPagesLinks(); ?>

This is the specific code that causes the pages links to display.

You'll notice that it is surrounded by php logic that checks whether the parameter 'show_pagination' is set to Yes. And it is important that this whole block is used if you want to display another instance of the page numbers navigation at the top of the page.
Code:
<?php if ($this->params->get('show_pagination')) : ?>
<tr>
   <td valign="top" align="center">
      <?php echo $this->pagination->getPagesLinks(); ?>
      <br /><br />
   </td>
</tr>
<?php endif; ?>


More info on the pagination elements that can be used in your template is available in the Documentation Wiki here.

_________________
Denise
Radiant Technology Consulting, Inc.
Connect with me on Linked In: http://www.linkedin.com/in/denisemclaurin


Top
  E-mail  
 
Posted: Fri Feb 29, 2008 1:41 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Nov 02, 2007 12:50 am
Posts: 13
Thats some great info.
Thanks so much!!!


Top
  E-mail  
 
Posted: Tue Jul 29, 2008 2:42 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Tue Jul 29, 2008 2:32 am
Posts: 1
---- Nevermind - I've found the patch.. ----------

I hope someone can help me out here.

I've created sections and categories on my site. When I create the Section Blog Layout in my menu it works perfectly fine. Everything is displayed and the pages show up.

However, when I create a Category Blog Layout the pagination on the bottom will not show up. I've selected show for everything, and I have 9 articles in my category. I changed the layout to have: 1 lead, 4 intro, 1 column, 0 links. But, it won't show the pages so they can look at more articles.

I have looked at the blog.php file listed above and pasted it into the template folder but nothing happened. I've entered in some text within the IF statements and they have displayed, but the function to display the page numbers isn't working.

Can someone help me out?

Section w/ Pages - http://www.camandcheese.com/joomla/reviews
VS.
Category w/o Pages - http://www.camandcheese.com/joomla/accessories


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Quick reply

 



Who is online

Users browsing this forum: Darren Smith, dockheas23, donmarvin, Exabot [Bot], klesk, n2designz and 57 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group