Ok so I've taken the XML sitemap creation admin plugin work someone did and I'm trying to make it better.
So I'm trying to stop it creating a XML node for sites that are container pages, i.e. dont have a template associated with them when I use page type builder.
The thing is when I check the PageData.HasTemplate it's always populated with true ARRGHH! That's no use then is it!
So I've found that you can change the Link Type in the Shortcut section to no link only text, but I don't want to set than manually. I want to filter out pages automatically which I've set with no Filename in the PTB class attribute.
Anyone have any ideas or eitehr how to set this link type in the PTB class in the code or another work-around. See what I'm setting my container pages like this:
[PageType("B9F7EFB8-4DF2-11E1-988B-CBF74724019B", Name = "Container", Description = "A container page type, used like a folder", Filename = "")]
To create container page types with PTB you can do something like this:
public class SectionPage : TypedPageData
HasTemplate = false;
Then you can check the HasTemplate property inside your code and filter out pages that don't have templates. I've also created an extension method that does this, you can find it in the Extension library for EPiServer CMS.
Hope this helps