And iterate through the nodes. Problem is that i get all the unpublished nodes to. But the properties are empty. So my widget lists "ghost news". I could check if the "header property" of the newsItem node is empty but that is not very cosher. There must be a better way to do it. Why do umbraco.config list unpublished nodes in the first place? Is it a bug?
I've never used GetXmlAll() - mostly because to me it makes no sense to put what I assume must be another copy of the entire tree (which is already in memory) into the memory.
@Christian Thanks, i will use that method instead of getXmlAll.
This doesn't solve my problem though. The node shouldn't be in umbraco.config in the first place. I think it has something to do with the autofolder package which I'm using. When i create a new "newsItem" the news item gets partially published. It looks unpublished but the newsItem node somehow get into umbraco.config but without any property data.
iterating unpublished nodes
I'm making a widget that lists the latest news. I'm doing something like this.
And iterate through the nodes. Problem is that i get all the unpublished nodes to. But the properties are empty. So my widget lists "ghost news". I could check if the "header property" of the newsItem node is empty but that is not very cosher. There must be a better way to do it. Why do umbraco.config list unpublished nodes in the first place? Is it a bug?
Hi Johan,
I've never used GetXmlAll() - mostly because to me it makes no sense to put what I assume must be another copy of the entire tree (which is already in memory) into the memory.
This will only get you published content:
/Chriztian
@Christian Thanks, i will use that method instead of getXmlAll.
This doesn't solve my problem though. The node shouldn't be in umbraco.config in the first place. I think it has something to do with the autofolder package which I'm using. When i create a new "newsItem" the news item gets partially published. It looks unpublished but the newsItem node somehow get into umbraco.config but without any property data.
is working on a reply...