I am using the following code to try and create pagination on my news section:
{exp:structure:breadcrumb here_as_title="yes"}
{exp:weblog:entries}
<h1>{title}</h1>
{page_body}
{/exp:weblog:entries}
{exp:structure:paginate parse="inward"}
{exp:weblog:entries weblog="news_and_events" dynamic="off" limit="2"}
<div class="item">
<h3><a href="http://{page_url}">{title}</a></h3>
<strong>{entry_date format="%d/%m/%Y"}</strong>
{news_headline}
</div>
<hr >
{/exp:weblog:entries}
{/exp:structure:paginate}the buttons appear but content is not changing when I click them, it’s just the same two posts on the page but URL changes to “news_and_events?page=2”
The way my news listing page is setup, and my news detail (to read the whole single item) is as per the instructions on the Structure site - where I have created a blog called “news_and_events” and have two templates - news and news_detail.
Help appreciated as I am wrecking my head with this - i need to get this paginating as I am not setting up archives.
Are you using the LG .htaccess Generator to remove the index.php by any chance? I had exactly the same problem, so I disabled the extension and used the following method and pagination worked perfectly:
RewriteEngine on
RewriteCond $1 !^(images|system|themes|favicon\.ico|robots\.txt|path\.php|index\.php|([a-z0-9-]+).html) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]This uses the ‘Exclude’ method which works perfectly. The first condition should list all the files or folders to NOT be rewritten (ie images, system etc).
I’ve got a dev site here: http://gsis.amystoddard.com
I am not using the LG Site Access Generator. The page I’m having issues with is here: http://gsis.amystoddard.com/index.php/about/staff-directory/?page=2
If I leave the “index.php” as part of the URL, page 2 renders fine. If I take it out, it doesn’t paginate.
I’ve tried two different .htaccess files. The first uses the “File and Directory Check Method” found here and looks like this:
# BEGIN Expression Engine Rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
</IfModule>
# END Expression Engine Rewrite
*****
I tried a second method using the "<a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Exclude_List_Method">Include/Exclude</a>" method that was recommended to me by Travis (creator of the "Structure" module). This still isn't working. My "system" folder is renamed to "admin." With this .htaccess file...all the "pages" are broke unless i manually include "index.php" in the URL.
*****
# BEGIN Expression Engine Rewrite
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(images|admin|css|js|site|themes|favicon\.ico|robots\.txt|path\.php|index\.php|([a-z0-9-]+).html) [NC]
RewriteRule ^(.*)$ /index.php?$1 [L]
</IfModule>
# END Expression Engine RewriteIs there something I can add to this .htaccess file that will make it paginate w/o the index.php in the URL?
Amy, try using the following .htaccess
RewriteEngine On
RewriteBase /
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]The difference from the one you had previously is in the index.php/$1 instead of what you had index.php?$1
If that doesn’t help PM me and I’ll see if I can help since I used to do the code for Structure.
I’m having the same issue as Amy. I have tried both htaccess rewrite rules with no luck. The page this is happening at is located here:
http://agedefy.server288.com/press-and-media/current-news/
My hosting company is ICDSoft. If anyone has experience getting this to work on ICDSoft servers please let me know. I’ve tried contacting their support team but they say it’s beyond their tech support capability.
Amy, have you had any luck with this?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.