ITagQuery - to return nodes that are not on the recycle bin #14331
vlaellayug
started this conversation in
Features and ideas
Replies: 1 comment
-
Yes, agreed. I think in most cases the expectation would be not to include nodes that are "deleted" in any query for Content. However, given that it currently does then adding an extra optional parameter to the query that would prevent deleted nodes being returned would be a great help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that the methods for ITagQuery - return results even though the node is on the recycle bin.
Which it doesn't fit on some scenarios.
e.g - on a Blog Listing page, where there are Blog Detail pages and using the GetAllContentTags() to get all of the tags and adding it on a filter returns an invalid result and if you want to list all of the tags containing how many published nodes per tag is available, because if a blog got deleted with a unique tag - it still returns the tag and gets added on the node count due to the query on the GetTagsForEntityType():
sql .Where<NodeDto>(dto => dto.NodeObjectType == nodeObjectType);
where if we're only gonna return nodes that is not on the recycle bin,sql .Where<NodeDto>(dto => dto.NodeObjectType == nodeObjectType && dto.IsTrashed == false);
Suggestion: maybe add a parameter on the ITagQuery like isDeleted or create a new method called GetAllPublishedTags()?
Beta Was this translation helpful? Give feedback.
All reactions