[WM] Exclude pages from site map

Alan Jackson ajackson.oplnk.net
Tue Aug 6 20:23:03 IST 2002


On Tue, 06 Aug 2002 12:52:32 +0100
jm at jmason.org (Justin Mason) wrote:

> 
> Alan Jackson said:
> 
> > Is there a way to exclude a set of pages from the site map? For each
> > page in the site I also create a "printer friendly" page, and I would
> > like to exclude all of those from the sitemap.
> 
> Yep -- the map attribute.  <content ... map=false>.
> 
> If typing that gets tiresome, then use <attrdefault>:
> 
>         <attrdefault map=false>
>         <content ....>....</content>
>         <content ....>....</content>
>         ...etc.
>         </attrdefault>

But in my case I'm using the same content twice, with different templates.
Once for the original page, and again for the printer-friendly style.
How can I map one and not the other?

Ahhh... this worked. Kewl! Change the default for the attribute even after
the content is defined, around the <out> block!

<for name="pagename" values="${txtfiles}">
	<out file="${pagename}.html" name="${pagename}">
		<{set page_text="${${pagename}}" }>
		<{set print="${pagename}_print.html" }>
         ${page_template}
	</out>
	<attrdefault map="false">
	<out file="${pagename}_print.html" name="${pagename}_print">
		<{set page_text="${${pagename}}" }>
		${print_template}
	</out>
	</attrdefault>
</for>



-- 
-----------------------------------------------------------------------
| Alan K. Jackson            | To see a World in a Grain of Sand      |
| alan at ajackson.org          | And a Heaven in a Wild Flower,         |
| www.ajackson.org           | Hold Infinity in the palm of your hand |
| Houston, Texas             | And Eternity in an hour. - Blake       |
-----------------------------------------------------------------------




More information about the Webmake-talk mailing list