Dear Members,
My sitemap is similar to this:
Sitemap
=====
Products (Folder - containing many documents)
Services (Folder - containing many document)
I have NewsListing on both Products and Services showing the latest 5 documents added into the respective folders and it works fine.
On the "Products" page(template) I have a right-column (sidebar) that shows the last 5 documents added into "Services" and vice-versa... that too works fine.
BUT, when I set paginate=1 NEXT ’x’ items of products folder, the side bar does not show the last 5 items from the Services folder and vice-versa.
Why could this be happening?
The snippet to output the sidebar content called the "snapshot" is listed below... what I try to do is, check the ID of the document and then output the relevant newslisting i.e. "Services Listing in the sidebar of Products" and "Products NewsListing in the sidebar of Services" and when I use the NEXT>> link, the ID of the Product page remains the SAME, so I dont know hey the sidebar does not show the "Services" Listing.
//usage: [!ap-snapshot? &sID=16 &sSummarize=5!]
$sID = $sID;
// select the startID for the snapshot
$sSummarize = isset($sSummarize)? $sSummarize : 10;
// select the toatl number of posts to list for the snapshot
$snippetName='ap-NewsListing';
$snippetParams=array('startID'=>$sID,
'summarize'=>$sSummarize,
'multilevel'=>1,
'truncText'=>"Read More",
'hidefolders'=>"true",
'truncSplit'=>"false",
'tpl'=>"ap-snapshot-list",
'dateformat'=>"%d,%b,%Y",
'showarch'=>"false",
'archplaceholder'=>1,
'emptytext'=>"No content available");
if($sID == 16) $sHeading='<a href="[~'.$sID.'~]" title="Events">Events</a>';
elseif($sID == 5) $sHeading='<a href="[~'.$sID.'~]" title="Projects">Projects</a>';
else {
$outstring='<p>Invalid ID for Snapsnot</p>';
return $outstring;
}
$outstring='<div class="snapshot cf"><h1 class="t1">'.$sHeading.'</h1>';
$outstring.='<ul>';
$outstring.=$modx->runSnippet($snippetName, $snippetParams);
$outstring.='</ul>';
$outstring.='</div> <!-- /snapshot --><hr />';
return $outstring;
Thanks for all your time and effort.
warm regards,
-raavi.