The 404 module has received a security update for any version below v1.6!
If you are using this module on your website you are advised to upgrade the module as soon as possible!

Sorry, this page is only available in one language

SiteParentModifiedX

Suggested dropletname: SiteParentModifiedX

Published by: rsmith

Create information and link on when your site was last updated for the last 'X' public pages and that share the same root_parent
 

global $database, $wb;
$links="";
if(!isset($x)){$x=10;};
if(!isset($rootparent)){$rootparent=0;};
$links="Last $x Updated Pages <ul>";
if (PAGE_ID>0) {
	$query=$database->query("SELECT modified_when, link,page_title FROM ".TABLE_PREFIX."pages where visibility='public' and root_parent='$rootparent' order by modified_when desc limit $x");
	while($mod_details=$query->fetchRow()){
	$links=$links." <li><b><a href='".PAGES_DIRECTORY.$mod_details[1].PAGE_EXTENSION."'>".$mod_details[2]."</b> ".date("m/d/Y",$mod_details[0]). " : ".date("H:i",$mod_details[0])."</a></li>";
	}
	$links=$links."</ul>";
	return $links;
}

Optional parameters

x=(amount of links)
rootparent=(page_id)

Example

[[SiteParentModifiedX?x=5]]



| Overview | Next droplet »