don't display current page in page list

Permalink
any way to tell my custom page list block not to display the current page. i have it showing 3 pages from within the sitemap (but i don't want the for loop to include the current page).

thanks!

 
Tony replied on at Permalink Best Answer Reply
Tony
you could override the pagelist block's controller, by copying it to /blocks/page_list/controller.php, and then within getPages(), after "$pl = new PageList()", add something like:

$c = $this->getCollectionObject();
$pl->filter(false, 'p1.cID!='.$c->getCollectionID() );
jhart replied on at Permalink Reply
did not like that...

mysql error: [1054: Unknown column 'pp1.cID' in 'where clause'] in EXECUTE("select p1.cID, pt.ctHandle from Pages p1 left join Pages p2 on

and so on...

also, i have a page list that is checked with "display aliases" but the aliased pages aren't showing (i didn't touch the controller code)
Tony replied on at Permalink Reply
Tony
oops. just use one "p", like 'p1.cID!='
jhart replied on at Permalink Reply
thanks tony!

do you know why my aliases aren't showing in the page lists??? i'm on the latest version of c5.
admin replied on at Permalink Reply
It would be awesome if this was a check box in the Page List edit dialog. The option would be very handy.