Hi there,
Just wondering how much work would be involved in cleaning up the URL structure when using the paging module? The clean URL feature of Drupal was one of the biggest drawcards for me, and using the path and pathauto modules I am able to automatically generate the URL exactly as I want, such as;
http://mydomain.com/articles/multi_page_article
However, when I start browsing the pages of an article the URL becomes a bit untidy, looking like;
http://mydomain.com/articles/multi_page_article?page=0%2C1
Would it be possible to get it to follow the same URL structure as when viewing comments, such as;
http://mydomain.com/articles/multi_page_article#page_1
Or even something like;
http://mydomain.com/articles/multi_page_article/page_1
What do you think? Good idea? Bad idea? Impossible?
Comments
Comment #1
alliax commentednice request
Comment #2
slayerment commentedI think that would be awesome to have something like that.
Comment #3
merlinofchaos commentedBecause we're using the built in Drupal pager, this isn't really possible at this time without foregoing that system.
Comment #4
brashquido commentedOk, I've posted this as a feature request in the pathauto module.
Comment #5
merlinofchaos commentedSorry but pathauto won't be able to do it either.
Comment #6
brashquido commentedThat's very disappointing then. So you are saying there is no way of implementing clean URL's for multipage articles (even when using URL aliases) without developing a paging system that does not use Drupal's native paging system?
Comment #7
merlinofchaos commentedWell, you could always make multiple nodes that link to each other (like book module).
Comment #8
brashquido commentedThe book module does not really give the effect/structure I am after.
Just looking at the URL structure again, and just seeing some differences and was wondering why. When paging the main page of Drupal the URL looks like this;
/node?page=2However, when paging an node using the Paging Module the URL looks like this;
/multipage_article?page=0%2C2The status bar in Firefox shows the URI stem as being;
/multipage_article?page=0,2So I assume %2C is unicode for the comma symbol. Is there anyway of removing the 0, from the string so that it does not mess up the URL?
Comment #9
merlinofchaos commentedThe 0, is necessary because comments use the first pager, so paging *has* to use the second one.
Comment #10
merlinofchaos commentedchx pointed out elsewhere that one could do some RewriteURL magic using apache and transform the URLs.
Comment #11
brashquido commentedOk, I'll see about doing this with a rewrite rule rather than in Drupal itself.
Comment #12
Success commentedAny update to this?
Comment #13
xanoThe best way on doing this would be creating URLs like /article/1/ with '/article/' being the node URL and '1/' being the page. Let's start easy: You need your function to check the last URL argument ('1' in this case) and load the proper page. There are hardly any problems in this part, but here they come: What if you got a node with an URL ending with a number, like /1/? This page is just called '1'. Page one would be located ad /1/1/ (and /1/ as well) and page two at /1/2/. Now the problem is to see whether the last argument does or does not indicate the page number.
If anyone could tell me how to do this I wouldn't mind writing some code to fix this.
This is a rather critical feature in the eye of SEO and usability so I changed the Priority.
Comment #14
merlinofchaos commentedXano: Read the damn issue. There is a completely valid reason this was won't fixed. Unless you address that reason, you're just being a menace.
Comment #15
kalashari commentedI don't understand... Nothing can be done to fix URLs appearing like /multipage_article?page=0%2C2 ????
I mean who wants to use URLs like that on his website?
Comment #16
darren ohJust means the module maintainers won't work on this. Any one who comes up with a solution should share it here.
Comment #17
kalashari commentedok... btw if I leave these URLs like this, are they crawled by SEs properly or no?
Comment #18
kalashari commentedanybody knows if the URLs like this are crawled by search engines?
Comment #19
darren ohI believe XML Sitemap users have successfully submitted URLs like this to Google.
Comment #20
Zoologico commentedYou guys should try Clean Pagination module:
http://drupal.org/project/cleanpager
I use it for my multipage Views.
Comment #21
Gurpartap Singh commentedClean pager for paging: http://myzonelabs.com/node/19
:-)
I hope we can move node paging support into cleanpager itself. Tested with 6.x-1.x-dev.
Comment #22
clevy commentedThis issue is addressed in this thread with some possible solutions:
http://groups.drupal.org/node/3472
Comment #23
moneesh.koundal commentedIf anyone have used cleanpage module in drupal 5 for clean page url. I have checked that cleanpager module in available in drupal 6 and development version of the module is not working.
I have also checked that module does not support url aliasing links for clean pagination url. Is there is any other solution for this.