Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to have custom URL for paginated nodes of the form [base_url]/[header_tag_name] instead of trailing ?page=n?
Comments
Comment #1
mundanity CreditAttribution: mundanity commentedHi there,
I like this idea, however, I'm not sure if the way I'm thinking of is really worth the extra code involved. Basically, we'd have to delete / create new URL aliases every time the node was updated, which I'm not a huge fan of.
Comment #2
nikhiljain CreditAttribution: nikhiljain commentedI understand the concern. Could you give me the idea on what lines you are thinking? If you could suggest me some ways to accomplish this, I'd like to work around this feature.
Comment #3
mundanity CreditAttribution: mundanity commentedHmm, well I was thinking of using the URL aliases table.
1. On update / insert / delete of a node, delete all aliases to the node, then rebuild them based on the page titles available.
2. On view of a node, translate the URLs (if they have the extra argument) to match the page it should show, then show the correct page.
I suppose the code would be "ok" in the sense that it would only run under these conditions, but that is a lot of code to add just for this feature. You're definitely welcome to take a stab at it, but my general sense for this module is that I don't want it too bloated for such a basic feature.
Comment #4
nikhiljain CreditAttribution: nikhiljain commentedI'm writing the code. If I succeed, i'll share the same. Also I agree with your take on this. Would be better if we can develop this feature as a dependent or sub-module for the pagination module.
Comment #5
mundanity CreditAttribution: mundanity commented