We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Problem

Pagination Link Question

I am trying to use pagination on an internal page of my site. Everything is loading properly but for some reason when I click the next arrow I get sent to my 404 page. The link is trying to go to the proper page /portfolio.php?page=2. This is probably something silly on my end that I'm just missing. Here is the link to the page https://www.coloradoseodesign.com/webDesign/portfolio.php. Any suggestions would be greatly appreciated.

                <perch:after>
                </div>
                <perch:if exists="paging">
                    <div class="paging">
                        <perch:content id="page_links" encode="false" type="hidden"/>
                        <perch:if exists="not_first_page">
                            <a href="<perch:content id="prev_url" encode="false" type="hidden"/>" rel="prev" title="Previous Page" ><img src="/_images/arrow-left.png" alt="Previous Article Arrow"></a>
                        </perch:if>
                            Page <perch:content id="current_page" type="hidden"/> of <perch:content id="number_of_pages" type="hidden"/>    
                        <perch:if exists="not_last_page">
                            <a href="<perch:content id="next_url" encode="false" type="hidden"/>" rel="next" title="Next Page" ><img src="/_images/arrow-right.png" alt="Next Article Arrow"></a>
                        </perch:if>
                    </div>
                </perch:if>
                </perch:after>

Also here is the main portfolio page that is calling for the pagination

<div class="mainServices">
                    <?php perch_content('Main Body'); ?>
                    <?php perch_content_custom('Cases', array(
                        'paginate'=> true,
                        'count'=> 4,
                    )); ?>
                </div>
Matt Holovach

Matt Holovach 0 points

  • 1 year ago

Are your server URLs case sensitive? "webDesign" in the portfolio page URL may not be the same as "webdesign" which is what Perch is trying to display in the paginated URL.

Yes they are case sensitive Clive good catch. In your opinion what would be the best option to make this work. - Change my directory to webdesign and all links etc.? - Or is it possible to tell Perch to look for webDesign directory instead of webdesign?

It would be easier for me to do the second choice but I'm not sure if that is an option. Thanks again for all your help and that was fast too

Nevermind Clive I added this to my htaccess and all seems to be working.

<IfModule mod_speling.c> CheckCaseOnly on CheckSpelling on </IfModule>

Clive, I was getting a little frustrated so I appreciate you helping point me in the right direction. I didn't even see the case problem.

I use lower case in my sites and I would do the first option.

I'm not 100% sure but I think Perch lowercases everything so the second option probably isn't workable.

I've not used <IfModule mod_speling.c> but if it's working for you, that's great.

Thanks Clive we must have been responding at the same time, but I found a directive for my htaccess file and all seems to be going again. I appreciate the help.