In general, I think the intent is that you get the CWikiPage when the WikiPageCommit* and WikiPageDisplay* methods are invoked on your subclass of WikiBlockPlugin.
Take the example in (FogBugz install)/Plugins/examples/WikiBlock/TableOfContents; it displays contents based on the headers in the document. TocBlock keeps these headers in an instance variable called rgHeaders, which is set by TocManager in its override of RenderWikiBlock. It gets the contents of the page from WikiPageDisplayView and stores what it needs in an instance variable. You will see that the other argument to WikiPageDisplayView is a CWikiPage; that's what you want.
public override string WikiPageDisplayView(CWikiPage oPage, string sContents)
{
// if this page contains a TocBlock, then annotate the headers with anchors and inject our toc css
if (ContainsWikiBlockTag(sContents, TocPlugin.BLOCK_IDENTIFIER, WikiBlockTagType.Persisted))
{
sContents = GetTocCss() + AnnotateHeaders(sContents);
}
return base.WikiPageDisplayView(oPage, sContents);
}
protected override string RenderWikiBlock(WikiBlock block, RenderingMode mode)
{
if (block is TocBlock)
{
(block as TocBlock).rgHeaders = headers;
}
return base.RenderWikiBlock(block, mode);
}
So what you would do is to grab the CWikiPage.ixWikiPage during your override of WikiBlockManager.WikiPageDisplayView, store it in an instance variable, then use that to set an instance variable on your subclass of of WikiBlock in your override of RenderWikiBlock.
Does that make sense? I know there's a fair amount of indirection here, but it makes these WikiBlocks surprisingly flexible.