Jump to content

SoapyDaz

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by SoapyDaz

  1. @Soma I've tested it with bigger limits (like 5, 10 etc) and it still doesn't behave properly unless $start is passed to $pagination->setStart as I've suggested before. Actually, just looked at the relevant documentation here and here's what it says: which is exactly what your $start = $input->urlSegment1 ? ($input->urlSegment1 - 1) * $limit : 0; line does.
  2. Tested the code snippet again more thoroughly and found that this line: $pagination->setStart($pageNum); causes the pagination to behave weirdly when I am on page 4+, changing it to: $pagination->setStart($start); seems to have fixed it. It looks like setStart takes the start offset rather than page number.
  3. @adrian Didn't realise it was that simple - thank you! Overlooked it as I'm using the Reno theme and it's sneakily hidden under "Helpers..."!
  4. Excuse my ignorance again if this has been asked, but can't seem to find anything about this... but how do you clear the error logs on the admin backend? Do you simply have to go in and delete the entries in the MySQL database that ProcessWire uses? Any pointer would be appreciated!
  5. Thank you to everyone who has responded - good to know that I haven't overlooked an option and rather it is because it is not officially supported! @clsource: I'm guessing the first line of your code wouldn't work out of the box, if the URL to start with has the prefix "page" (or whatever I configured it to)? Or do I have to artificially create the URL such that it only says "/2/" (where 2 can be any page number)? @Soma: Thank you for the code snippet - seems to work like a charm! The reason for no prefix is merely a cosmetic one rather than a functional one, so it's nice to know that it can be worked around even though it is not officially supported at the moment.
  6. TL;DR How to change a paginated URL so it reads "example.com/foo/2/" instead of "example.com/foo/page2/"? Excuse me if this is the wrong place to post this (in which case please move this to the right forum), or this has been asked before... but how do you remove the "page" prefix in a paginated url so that it reads something like "example.com/foo/1/" instead of the default of "example.com/foo/page1/"? I know that for any other type of prefix, I can just override $config->pageNumUrlPrefix in site/config.php, but I can't figure out how you'd do it if you simply want an effectively "blank" prefix. I've tried setting $config->pageNumUrlPrefix = '' but that ends up breaking pagination altogether or the page prefix ends up in the URL instead. The only way I can think of doing this is actually changing the line: if(!$pageNumUrlPrefix) $pageNumUrlPrefix = 'page'; to if(!$pageNumUrlPrefix) $pageNumUrlPrefix = ''; but tampering a module file seems bad practice and so I am looking for a better way to achieve this. Help a ProcessWire noob out!
  7. Thank you kongondo! Very new to ProcessWire and was looking forward to this as a quick mean to get me up and running with menu building! Will keep an eye out for when the module is updated!
  8. Hi kongondo, So, for the time being, does the plugin only work with v2.7.x of ProcessWire?
×
×
  • Create New...