[WM] sitemap and webmake

constant.dupuis.skynet.be constant.dupuis.skynet.be
Tue Nov 19 02:19:06 GMT 2002


Strange I don't receive any response to my questions in my mailbox, but reply are in the Archive. 
So I reply here to Alan Fitch and Alan Jackson. 
First I cannot set map=\"false\" otherwise matedata look not to be available in other contents. 
My map is more or less OK 
start 
 cfg
 sitemap
   Intro 
   Links 
     Information 
        News 
But in this map webmake add me the cfg ( global config content is map=\"true\") content and the sitemap content. What I don't want. BUT I found a work around, I try the grep attribute in the sitemap tag. This one allow to skip some content in the sitemap. But webmake doesn't us it if it's specified. After hacking a bit in the code I found that it was not use by the code generating the map. 
in SiteMpa.pm look for ( more or less line 136 )
my $context = {
'top' => $top,
'include_generated' => $map_generated_content,
'sortby' => $contobj->{sortorder},
'node' => $contobj->{sitemap_node_name},
'leaf' => $contobj->{sitemap_leaf_name},
'dynamic' => $contobj->{sitemap_dynamic_name},
'up' => undef,
'prev' => undef,
};

add 'grep' -> $contobj->{grep}, somewhere like 

my $context = {
'top' => $top,
'include_generated' => $map_generated_content,
'sortby' => $contobj->{sortorder},
'node' => $contobj->{sitemap_node_name},
'leaf' => $contobj->{sitemap_leaf_name},
'dynamic' => $contobj->{sitemap_dynamic_name},
>>>>> 'grep' => $contobj->{grep},
'up' => undef,
'prev' => undef,
};
Now in your site map tag you can add a grep attribute filled with something like :
grep=\"if( $_ =~ /sitemap|cfg/i ) { return 0;} else {return 1;}\"
$_ contain the current content name and if you return 0 the content will be ignored.
I sent a mail to jm at jmason.org to tell him the prob but no reply so fare.
Hope it help
Constant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://amgod.boxhost.net/pipermail/webmake-talk/attachments/20021119/64229293/attachment.htm


More information about the Webmake-talk mailing list