Page List viewing permissions (like auto nav)
PermalinkEven with advanced permissions on the page-list block, I can't this to display for guests.
The AutoNav "Display pages to users even when those users cannot access those pages." option would be ideal here.. has anyone been able to do this?
I am using (and recommending here) the excellent Featured Content Slider Page List Templates by c5mix, very happy to pay a little for a lot of time saved.
Anyway, here's what I did (if this is not best practice, please correct me ASAP)
1. Copy concrete/models/page_list.php to models/page_list.php
2. Set
protected $ignorePermissions = false;
protected $ignorePermissions = true;
That's it. I wasn't aware that this was possible till I started to hack the page-list block. I hope this saves someone some time, it's not uncommon to need to front restricted content in order to generate revenue.
Question for core team:
protected $displayOnlyPermittedPages = false; // not used.
Why not used?
I don't see protected $ignorePermissions = false; in the concrete/models/page_list.php file.
This is what's in the file that I can see:
<?php
defined('C5_EXECUTE') or die("Access Denied.");
class PageList extends Concrete5_Model_PageList {}
class PageSearchColumnSet extends Concrete5_Model_PageSearchColumnSet {}
class PageSearchDefaultColumnSet extends Concrete5_Model_PageSearchDefaultColumnSet {}
class PageSearchAvailableColumnSet extends Concrete5_Model_PageSearchAvailableColumnSet {}
Am I missing something?
Thanks,
Paul
What are you trying to accomplish?
I have pages that are restricted to registerd users. I need to display a page list that shows a listing of all the page links to guests, but when they click the link, because of the permission settings, it will take them to a login/register page.
Currently the page list will not show links that have premissions set to registerd users unless the user is logged in. So it would be much like the setting in the autonav block - "Display pages to users even when those users cannot access those pages"
I think thats clear....if not let me knwo
Did you ever find a solution to this request?
http://concrete5.org/api/Pages/PageList.html...
There's a method for the class that toggles permission-based filtering.
Voila.