Filter Sitemap

Permalink
**Edit I would like to display a branch of the site from a particular node. That I know the ID of, or pass through an ID, to use that as the start of the branch,

After working through this for a while the question below does not reflect what I am trying to achieve. I would prefer this method over a filter as I think this is better solution.


**Original,
Is it possible to filter the sitemap, say by Collection Type?

I am currently using a pagelist with a select box, filtered down, but with the possibility of 300+ pages (not including the rest of the site) this would get quite unusable.

I would like to view the sitemap but limited to a particular fork of the site.

Does anyone know if this is possible.

Or do I need to attempt to alter the actual sitemap, to create a single page which I can then refer to, which is custom filtered.

TheRealSean
 
SVijay replied on at Permalink Reply
SVijay
Hi seanom,

I am not sure how it will work, but try this way. In database there is a table named PageTypes, it contains the ctID value for each page type. In Pages table the ctID value is available, By checking the pages with the ctID you can filter the sitemap.
TheRealSean replied on at Permalink Reply
TheRealSean
Thanks for the reply, but I am not to sure, I get your instructions.

I can find both the Pages, and PageTypes, I can see the ctID and the types associated with the pages, but I can not work out how to filter those? using the sitemap popup.


I have spent a while looking through the "single_pages/dashboard/sitemap/full.php"

and noticed this
$nodes = $sh->getSubNodes(0, 1, false, true);


And this sort of does what I would like it to do.

I pass in a different cID and this pulls back the sitemap from that point.

My next step is to try to work out if I can get a sitemap popup window to load with the cID value pre-filled? (and not 0-all) Therefore only pulling the pages under that Particular page.
jbx replied on at Permalink Reply
jbx
This should definitely be possible - to try and point you in the right direction - if you go to the sitemap in the dashboard, then Page Search, there is a Page type filter there on the left. If you dig around in the files that call that, you should get you're answer.

I'm guessing there will be a filter of some kind that you can run (eg. $ah->filter - or something like that)

Also, try:


That may have some clues in it...

Jon
TheRealSean replied on at Permalink Reply
TheRealSean
Thanks Jon,

I will take a look into that
TheRealSean replied on at Permalink Reply
TheRealSean
The page search allows me to search, for pages using a particular, string/id

But it does not appear to do what I would like.

i thought i wanted to filter but i think it would be better to show all pages below a particular node


I have a list of pages, below a particular page.

I am using
$ps = Loader::helper('form/page_selector');
print $ps->selectPage('qP', $qP);


I think I have managed to work it out to the $display_mode and the $sitemapOverlayPreference which sets the node to 0,

I think I need to pass through the display mode somehow, from my new custom_page_selector
TheRealSean replied on at Permalink Reply
TheRealSean
I am having trouble passing the node through to the Sitemap,

I believe that I have it in the right location,

I have a selectPage() which loads a custom page selector.

Can anyone tell me if its hidden in this section?
$html .= '<script type="text/javascript"> 
      var ccmActivePageField;
      $(function() {
         $("a.ccm-sitemap-select-page").unbind();
         $("a.ccm-sitemap-select-page").dialog();
         $("a.ccm-sitemap-select-page").click(function() {
            ccmActivePageField = this;
         });
      });
      ccm_selectSitemapNode = function(cID, cName) { ';
      if($javascriptFunc=='' || $javascriptFunc=='ccm_selectSitemapNode'){
         $html .= '
         var fieldName = $(ccmActivePageField).attr("dialog-sender");
         var par = $(ccmActivePageField).parent().find(\'.ccm-summary-selected-item-label\');
         var pari = $(ccmActivePageField).parent().find("[name=\'"+fieldName+"\']");


Whatever I seem to do I have trouble passing through a different display mode to the sitemap.

I can do it if I call it from the custom page selector, but this embeds the sitemap I would like it to be a branch of a node displayed in the dialog.

Any Ideas?

Thanks
Sean
TheRealSean replied on at Permalink Reply
TheRealSean
I have managed to hack the value by passing it through as a query string then request the query string in the sitemap page, which I have had to edit to receive the display mode,

then do some custom tweaking to set the node to my custom page but there must be a better way of doing this??

Can anyone help, point me in the right direction??