marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Rows Per Page - How to customize?

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Rows Per Page - How to customize? »
Welcome, Guest. Please Login or Register.
12/15/17 at 10:16:48
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Rows Per Page - How to customize?
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Rows Per Page - How to customize?  (Read 907 times)
dmp65
Gold Dragon
****

Posts: 57



Go Scots!
   

Rows Per Page - How to customize?
« on: 11/20/11 at 17:46:41 »
Reply with quote Modify message

I've recently added the rowsperpage filter to some of the store ids in my shop. Currently, when the page displays, the page indicators <<1|2|3|4|5>> appear to the far left. I'd like to center them on the page and maybe change the font style/color but can't figure out how to make it work using my CSS.

If anyone can assist me, I'd greatly appreciate it.

Thanks,

Dave
Logged
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Rows Per Page - How to customize?
« Reply #1 on: 11/20/11 at 20:48:36 »
Reply with quote Modify message

I was looking at this a couple days ago...


Code:
<table cellpadding=3 cellspacing=0 border=0><tr><td align=center>
<span class="cpshop-pagelinks">
<a href="/peacenloveshop/7377278/3">&lt;&lt;</a>
| <a href="/peace_signs/peacenloveshop/7377278">1</a>
| <a href="/peace_signs/peacenloveshop/7377278/2">2</a>
| <a href="/peace_signs/peacenloveshop/7377278/3">3</a>
| 4 | <a href="/peace_signs/peacenloveshop/7377278/5">5</a>
| <a href="/peace_signs/peacenloveshop/7377278/5">&gt;&gt;</a>
</span>
</td></tr></table>


The table makes the centering problematic, but the following works around that, and provides for you other desires as well. =)

First, go into your cpshop thumbs template and replace <[content]> with


Code:
<div class="cpshop-menu-hack"><[content]></div>


Now add something like the following to the CSS Overides edit box in cpadmin.cgi.  


Code:
<style type="text/css">

.cpshop-pagelinks {
  font-family: arial;
  font-size:bigger;
  color:#DDDDDD;
}

.cpshop-pagelinks a {
   font-family: arial;
   font-size:bigger;
}

.cpshop-menu-hack table {
     margin: 0 auto; /* this bit will center the <table> holding the menu */
}

</style>


Save changes... that should do it.

NOTES:

If you put this in an external file and load it from your templates, but don't turn off cpshop's internally generated CSS, then that CSS will override yours.

If you turn off cpshop's CSS, you'll have to copy cpshop's CSS to an external file and load it from your templates -- in which case you can edit cpshop's CSS directly rather than override it with your own.

You'll speed up your page loads by copying cpshop's internally generated CSS to an external file and linking it from your templates.

« Last Edit: 11/20/11 at 21:16:17 by Hex Angel - Patrick » Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
dmp65
Gold Dragon
****

Posts: 57



Go Scots!
   

Re: Rows Per Page - How to customize?
« Reply #2 on: 11/21/11 at 00:19:51 »
Reply with quote Modify message

Thanks Patrick. I followed your instructions and added the code to my cptemplate, and the second code to the CSS override in CPAdmin but the page indicators are still appeaing on the left. Also, with the code added, when I mouse over the numbers, the whole page does a slight bounce. Do you have any other suggestions?

Thanks,

Dave
Logged
dmp65
Gold Dragon
****

Posts: 57



Go Scots!
   

Re: Rows Per Page - How to customize?
« Reply #3 on: 11/21/11 at 23:38:23 »
Reply with quote Modify message

Patrick, if you or anyone else (Marty?)can help me, I'd really be grateful.

My primary concern is being able to center the page indicators. On the far left, I don't think visitors notice them as well and I don't want them to miss the designs on the other pages. Plus, it will just look better

Thanks,

Dave
Logged
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Rows Per Page - How to customize?
« Reply #4 on: 11/22/11 at 00:40:51 »
Reply with quote Modify message

Hmmmm.... that worked on mine.

But... I'm doing things a little differently than everyone else, so that could be why.

If you've got Chrome or Firefox, then you can try the "inspect element" tool to help you track down where in the bloody CSS that auto margin is getting overridden.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
dmp65
Gold Dragon
****

Posts: 57



Go Scots!
   

Re: Rows Per Page - How to customize?
« Reply #5 on: 11/22/11 at 17:08:09 »
Reply with quote Modify message



on 11/22/11 at 00:40:51, Hex Angel - Patrick wrote:
Hmmmm.... that worked on mine.

But... I'm doing things a little differently than everyone else, so that could be why.

If you've got Chrome or Firefox, then you can try the "inspect element" tool to help you track down where in the bloody CSS that auto margin is getting overridden.


Lo and behold, I figured out the problem. Once I specified the width, it became centered.


Code:
<style type="text/css">

.cpshop-menu-hack table {
    width: 100%
    margin: 0 auto; }

</style>


Now that I have them centered, I'll spend some time experimenting with the font and colors.

Patrick, thanks again.

Dave
Logged
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Rows Per Page - How to customize?
« Reply #6 on: 11/22/11 at 20:09:56 »
Reply with quote Modify message

Ah, of course! The table cells are centered... perfect.

You can take out the margin, it's not doing anything.

Glad you figured that out. =)

Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
dmp65
Gold Dragon
****

Posts: 57



Go Scots!
   

Re: Rows Per Page - How to customize?
« Reply #7 on: 11/23/11 at 03:45:34 »
Reply with quote Modify message

As it turns out, setting the width for the menu-hack created some problems with other tables, including the product pages where there are front and back images.

So, I got rid of it, isolated the changes to the cpshop-page-links and managed to center it using padding. This worked great. Tested it in several browsers and no problems. Obviously, the only downside is that if your page numbers increase, you'll have to adjust the padding to re-center it. Not a big deal since it's easily adjusted in the css override of CPAdmin.

Here's my final code:


Code:
<style type="text/css">
.cpshop-pagelinks { color: #fff
; font-size: 12px; font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif; font-weight: normal; padding: 0 0 0 320;}

.cpshop-pagelinks a:link, .cpshop-pagelinks a:active, .cpshop-pagelinks a:visited { color: #000; font-size: 12px; font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif; font-weight: bold;   }

.cpshop-pagelinks a:hover { color: #000; text-decoration: underline; }

</style>


Logged
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Rows Per Page - How to customize?
« Reply #8 on: 02/15/12 at 21:14:14 »
Reply with quote Modify message

Patrick!

is there any way to make the page indicator links have the page titles say "Page 2", "Page 3" and so on so in the titles we don't have so many duplicate titles?  PLEASE
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Rows Per Page - How to customize?
« Reply #9 on: 02/16/12 at 03:50:43 »
Reply with quote Modify message

Hey Myke...

Not a simple one that I know of.

I coded cpshop.cgi on the Peace & Love Shop to  parse $content and do pagination. It takes a fair bit of coding, and proprietary tags in the templates and also the thumbnail grid cells.

On the plus side, I'm able to paginate by product type classes. =) Better SEO and navigability.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Rows Per Page - How to customize?
« Reply #10 on: 02/16/12 at 18:17:55 »
Reply with quote Modify message

Sorry to hijack

Patrick,

If you could send over some code or at least show me what you got, I'd love to try this.  I'm thinking I need to take it up a notch.  I can't seem to split out apparel on page 1 of every design and have gift items on page 2 of every design at my shop.  Problem is, I have different arrays of products and sometimes gifts show at the bottom of page 1 and sometimes at the top of page 2.  This is a problem  for my "jump to" links code that uses anchor links in my sortorder.txt file.
« Last Edit: 02/16/12 at 18:19:28 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.