SimplePortal
Customization => Blocks and Modifications => Block Requests => Topic started by: zapiy on August 30, 2012, 06:12:58 AM
-
Hi all, we have used Simplportal on our site for creating review pages.. What i wondered is there someone that could help me to create a block that will pull some random reviews to a block?
-
zapiy,
Below is custom php block that will display a random Simple Portal page. With this block you must edit the array within to reflect the Page ID's that you wish to display.
global $scripturl;
/* Add Page ID's to the array */
$pages = array('page1', 'page2', 'page3');
/* Redirect to random portal page */
redirectexit($scripturl . '?page=' . $pages[array_rand($pages,1)]);
-
Thanks for this and sorry for the delay on getting back to you..
Is there a way that it just lists 5 of them with the titles as the links in a block?