pagination urls, cannot edit?
Posted: 28 August 2008 06:46 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  262
Joined  08-17-2004

I have a site in the staging period right now and I want to add pagination to articles.

I have the domain set to: http://www.site.com/temp
temp is the index page.

When I try to put pagination in an articles list page pagination adds the index page to the url so I get.

http://www.site.com/temp/temp/template-group/articles-list/P0/

How can I get rid of the extra temp pagination adds to the url?

Thanks

Profile
 
 
Posted: 28 August 2008 06:53 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12381
Joined  04-29-2002

Perhaps some sort of URL rewrite?

Similar Thread

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 28 August 2008 07:00 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  262
Joined  08-17-2004

I don’t want to get rid of the /P0/
I just don’t want EE to duplicate my index page when creating pagination links so it just goes to the proper page. Is pagination pulling the domain url from an admin field somewhere so I can edit it?

Profile
 
 
Posted: 28 August 2008 07:35 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12381
Joined  04-29-2002

Figured a method for getting rid of P0 in the links..

{paginate}

<div class="pagination pages{total_pages}">

{exp:replace find="/P0" replace=""}

  Page {current_page} of {total_pages} pages
: {pagination_links}

{
/exp:replace}

</div>

{/paginate}

Using the Find and Replace plugin, I replaced /P0 with nothing.

Will that work for you?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 28 August 2008 07:40 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  262
Joined  08-17-2004

Hi Sue,

Thank you for taking the trouble to write the code.
It’s not the P0 that is the problem. Pagination is repeating my index page in the url so that it is pulling a non existent page.

So what pagination is doing is this.
http://mysite.com/index/index/template_group/article-list/P0

The P0 is fine but the extra index is what’s causing me headaches.

Thanks

Profile
 
 
Posted: 28 August 2008 07:45 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12381
Joined  04-29-2002

Can you tell I need some sleep?

Are you doing any sort of URL writing or renaming of index.php in your .htaccess file? Is this the only place you’re seeing it?

The code I posted can also replace /index/index/ with just plain /index/ smile

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 28 August 2008 07:53 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  262
Joined  08-17-2004

Yes, I took out the .php from the index file in .htaccess. So far this is the only instance where I’m seeing it but I’ve hard coded the full urls in my nav so EE is not automatically grabbing the urls.

I appreciate the code and it could come in handy in case I want to get rid of the P0 but for now I would like to figure out what EE is doing so I can fix it without url rewriting.

Profile
 
 
Posted: 02 September 2008 03:02 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12381
Joined  04-29-2002

Hi, dekalog6.

Can you post the contents of your .htaccess file? That might be of help.

Also, what is the value of the following two fields:

Name of your site’s index page
URL to the root directory of your site

Which can be found at Admin ›  System Preferences ›  General Configuration

Also, there are settings in the CP for the path to your site.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 02 September 2008 03:05 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
RankRank
Total Posts:  262
Joined  08-17-2004

I did change those. It turns out I had the index page included in the $site_url variable in my path.php file. It seems to be working now that I’ve removed the index page from the url.

Thanks

Profile
 
 
Posted: 02 September 2008 03:17 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12381
Joined  04-29-2002

Excellent! Glad you were able to figure out the issue. Please don’t hesitate to post again if needed.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64912 Total Logged-in Users: 25
Total Topics: 81864 Total Anonymous Users: 17
Total Replies: 440101 Total Guests: 182
Total Posts: 521965    
Members ( View Memberlist )
Newest Members:  bjmohrAqua193Bios Elementmjpoteetguimogranwelshmrcfthenetmonkeybenekwhobutsb