Results 1 to 8 of 8

Thread: Pagination script question...selected page?

  1. #1
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Pagination script question...selected page?

    Question RE: Pagination here: http://www.dynamicdrive.com/style/cs...ination_links/

    I have implemented this here: http://www.makeuptalk.com/reviews/brands/1/Makeup.html

    My question is this. How can I get the "SELECTED" corresponding letter to stay selected? For example, if I am on this page: http://www.makeuptalk.com/reviews/br.../D/Makeup.html, how can I get the letter "D" to remain highlighted or selected?

    Here is my php code used:

    Code:
    print "<div align='center'><font class='bigreviewtoptext2'><a href='/reviews/brands/$cate_id/$seo_title_cat.html'>$cate_name</a>"; if($w_reviewid[5]) print " - Brands that begin with $brand_initial"; else print " - Browse by Brands"; print "</font></div><br />";
    print "<div class='pagination'>
    <ul>
    <li><a href='/reviews/brands/$cate_id/A/$seo_title_cat.html'>A</a></li>
    <li><a href='/reviews/brands/$cate_id/B/$seo_title_cat.html'>B</a></li>
    <li><a href='/reviews/brands/$cate_id/C/$seo_title_cat.html'>C</a></li>
    <li><a href='/reviews/brands/$cate_id/D/$seo_title_cat.html'>D</a></li>
    <li><a href='/reviews/brands/$cate_id/E/$seo_title_cat.html'>E</a></li>
    <li><a href='/reviews/brands/$cate_id/F/$seo_title_cat.html'>F</a></li>
    <li><a href='/reviews/brands/$cate_id/G/$seo_title_cat.html'>G</a></li>
    <li><a href='/reviews/brands/$cate_id/H/$seo_title_cat.html'>H</a></li>
    <li><a href='/reviews/brands/$cate_id/I/$seo_title_cat.html'>I</a></li>
    <li><a href='/reviews/brands/$cate_id/J/$seo_title_cat.html'>J</a></li>
    <li><a href='/reviews/brands/$cate_id/K/$seo_title_cat.html'>K</a></li>
    <li><a href='/reviews/brands/$cate_id/L/$seo_title_cat.html'>L</a></li>
    <li><a href='/reviews/brands/$cate_id/M/$seo_title_cat.html'>M</a></li>
    <li><a href='/reviews/brands/$cate_id/N/$seo_title_cat.html'>N</a></li>
    <li><a href='/reviews/brands/$cate_id/O/$seo_title_cat.html'>O</a></li>
    <li><a href='/reviews/brands/$cate_id/P/$seo_title_cat.html'>P</a></li>
    <li><a href='/reviews/brands/$cate_id/Q/$seo_title_cat.html'>Q</a></li>
    <li><a href='/reviews/brands/$cate_id/R/$seo_title_cat.html'>R</a></li>
    <li><a href='/reviews/brands/$cate_id/S/$seo_title_cat.html'>S</a></li>
    <li><a href='/reviews/brands/$cate_id/T/$seo_title_cat.html'>T</a></li>
    <li><a href='/reviews/brands/$cate_id/U/$seo_title_cat.html'>U</a></li>
    <li><a href='/reviews/brands/$cate_id/V/$seo_title_cat.html'>V</a></li>
    <li><a href='/reviews/brands/$cate_id/W/$seo_title_cat.html'>W</a></li>
    <li><a href='/reviews/brands/$cate_id/X/$seo_title_cat.html'>X</a></li>
    <li><a href='/reviews/brands/$cate_id/Y/$seo_title_cat.html'>Y</a></li>
    <li><a href='/reviews/brands/$cate_id/Z/$seo_title_cat.html'>Z</a></li>
    </ul>
    </div>";
    Thank you for your time.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    On each page you'd have to apply the current class. For example if you were on page 'W,' then in the code for page W you would wanna add the highlighted:
    Code:
    <li><a href='/reviews/brands/$cate_id/W/$seo_title_cat.html' class="currentpage">W</a></li>
    Hope this helps,
    Nile
    Jeremy | jfein.net

  3. #3
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Oh I knew this. My pages are dynamically generated. What I don't know is how to code that up for dynamically generated pages. It's php.


    Quote Originally Posted by Nile View Post
    On each page you'd have to apply the current class. For example if you were on page 'W,' then in the code for page W you would wanna add the highlighted:
    Code:
    <li><a href='/reviews/brands/$cate_id/W/$seo_title_cat.html' class="currentpage">W</a></li>
    Hope this helps,
    Nile

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Are you using modRewrite? It looks like you are... If you are, can you post what the real address for:
    Code:
    /reviews/brands/$cate_id/A/$seo_title_cat.html
    Would look like please.
    Jeremy | jfein.net

  5. #5
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Nile View Post
    Are you using modRewrite? It looks like you are... If you are, can you post what the real address for:
    Code:
    /reviews/brands/$cate_id/A/$seo_title_cat.html
    Would look like please.
    I tried to contact you on MSN messenger. I added you. Maybe you can help me out there? Let me know.

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I am not available on MSN right now.. Please tell me if your using modRewrite - and if you are the normal URL instad of the rewrited URL.
    Jeremy | jfein.net

  7. The Following User Says Thank You to Nile For This Useful Post:

    Kihon (01-04-2009)

  8. #7
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile, thanks very much for helping me, that worked!

  9. #8
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I'm glad to help you Kihon.
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •