I got it to work in a sample project using a simple for-loop with the int as id.
Then I changed it to my repository again and then no nodes showed up in the sitemap!
So I tried to limit the number of nodes, like this:
public override IEnumerable<DynamicNode> GetDynamicNodeCollection()
var repository = new Repository();
int i = 186;
var items = repository.GetItems();
foreach (var item in items)
if (i == 0) break;
var node = new DynamicNode(item.Slug, item.DisplayName);
yield return node;
The wierd thing is that this works, but if I set i to 187, then I have NO NODES again...
So what's up, is there a max limit of nodes in a sitemap or something?