Userlists Page Navigation SEF links....still not friendly

5 years 7 months ago #307120 by knotworking
I started a thread in the professional support forum somewhere around 3 years ago, I'd follow-up there but I'd have to purchase again just to comment. I was told back then making the page navigation links at the bottom of lists SEF was something that was being discussed, but it's still in the same state ie., every link looks like this:
index.php?option=com_comprofiler&view=userslist&listid=55&searchmode=0&Itemid=640&limit=25&limitstart=25
(which, when you have a few dozen pages in the list, does a horrible job of tying those links to the SEF main page)

I dug into the code to figure out where the links are generated, in the library file /CBLib/CB/Legacy/cbUsersList.php on line 511 there's this call:
$pageNav->setBaseURL( $_CB_framework->rawViewUrl( array( 'userslist', 'listid' => (int) $row->listid ), true, array( 'searchmode' => 0 ) ), true );
The call to rawViewUrl on this line is the only reference to that function that I could find in the codebase; I could have edited the function itself, but I thought it better/safer to edit the call. I changed the line to:
$pageNav->setBaseURL( $_CB_framework->viewUrl( array( 'userslist', 'listid' => (int) $row->listid ), true), true );
Which replaced the rawViewUrl with viewUrl and also removed the searchmode (I don't allow searches of members). The links generated now look like this:
https://localhost/testing/alabama-members/birmingham.html?limit=25&limitstart=25

I tried fooling with the router to get limit and limitstart incorporated in the SEF link, but no dice (I didn't put too much time into it, I can live with the above). All page navigation links work to show the many pages/people in the list, but the URL in the address bar never changes (it's always https://localhost/testing/alabama-members/birmingham.html no matter what page I'm on). I don't think that's a big deal, since search engines will be crawling the navigation URLs and finding new profiles (so it won't appear to be duplicate content).

My concern (at this point) is the unknown. I've tested everything I could, I don't see any issues with the change. Are there any drawbacks to the change I have made? If not, the only question would be is it possible to incorporate limit and limitstart into the router, so the SEF link looks something like this:
https://localhost/testing/alabama-members/birmingham/25/75.html (I might not even want that...looks ugly, but I like having the option)

Any feedback is appreciated.

Please Log in to join the conversation.

5 years 7 months ago #307139 by krileon
This has all already been improved, but is pending merge and release (all our code is peer reviewed). Paging and searching of userlists, once these changes are merged, will be completely SEO friendly. This includes browser back navigation (e.g. search, visit a profile, and hit browser back will display search again). In addition to search and paging SEO friendly URLs the userlist selection dropdown will properly navigate to the userlists URL instead of just submitting the form.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

5 years 7 months ago #307147 by knotworking
Looking forward to seeing that implementation. I hack the code up quite a bit to get the system to do what I want, one less hack to do every update would be nice....

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.199 seconds

Facebook Twitter LinkedIn