14 Aug 2012
04 Feb 2009
Link to this post
Actually I am already doing pretty much what you are showing. here is my code. (BTW, how do I format code on this forum like you did? Taking a guess each time I post)
if (workflow != null)
PageWorkflow activity = (PageWorkflow)workflow.Activity;
== ApprovalStatus.Draft || activity.ApprovalStatus ==
ApprovalStatus.ForApproval || activity.ApprovalStatus ==
|| activity.ApprovalStatus ==
allowNav = true;
However my problem isn't in how to check workflow, but how to check to see if there is a previously published version of the page available. You see, I am allowing Unplublished and Unapproved pages to appear in the nav inside /sitefinity/ "isSitefinity" but not on the main site.
This works great until a page goes from Published, back to Draft again. I need to be able to look at the history of the page to find out if it has a previously published version . If I know this, I will allow the nav to stay in place in the main site.