Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [SOLVED] Small problem with pagination pages  (Read 604 times)

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
[SOLVED] Small problem with pagination pages
« on: September 14, 2012, 03:05:42 PM »

Don't know if anyone will see this (:P) but I'm having a slight problem that has to do with the article pages when paginator is used, specifically related to the "home" index. The problem is that I've got a setup where I'm printing the category name and description at the top of the content area, just for info, and calling it in with this specific code to only show it on category indexes:

Code: [Select]
<?php
if($categorySEF && ($_POS == 0)) { echo '
    <header id="catname">
        <h1>'
.$_NAME.'</h1>
        <p>'
.$_DESCR.'</p>
    </header>
'
; }
?>

The problem is that the header (which is subtly different in style than the main content area to make it visible) appears on domain/p_x/ pages as well, but naturally without either cat name or description. So my question is: how to make the cat name/description header NOT appear on domain/p_x pages?
(I tested with "if($categorySEF && ($categorySEF != 'p_') && ($_POS == 0)) {" but that does nothing, and adding a wildcard after 'p_' blanks the site -- all completely expected but necessary to test.)
Suggestions are welcome. Thanks.
« Last Edit: September 15, 2012, 03:20:20 PM by Fred K »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Small problem with pagination pages
« Reply #1 on: September 15, 2012, 02:54:06 PM »

I think you may want to use:
stripos($haystack, $needle)

replace  ($categorySEF != 'p_') with
(stripos($categorySEF, $l['paginator']) === FALSE )
and see if that does it for you...
Logged
Of all the things I have lost, it is my mind that I miss the most.

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
[SOLVED] Re: Small problem with pagination pages
« Reply #2 on: September 15, 2012, 03:19:55 PM »

It does, thank you very much!
Logged