Discussion for FogBugz Plugin developers
It used to work well, but a customer reports that the URL of a new wiki page is like default.asp?W19 while the URL of an existing page in edit mode is default.asp?pg=pgWiki&ixWikiPage=1&command=edit.
I think that for the moment I will fix the regexp which parses the URL, but is there a better way to get the wiki page id?
Could you tell me which Wiki interfaces your plugin is implementing and at what point you need to know the ixWikiPage, and I'll tell you if there is a better way to get the ixWikiPage? Do you need to know it when you create a Wysiwyg context menu item, or at page display time?
thanks for replying.
If you prefer to read the actual code, just let me know and I'll send it to you by mail.
You're right, this is terribly unclear. This is part of the answer: http://fogbugz.stackexchange.com/questions/732/plug-in-api-how-to-i-get-information-about-the-container-wiki-page-in-wikiblock
. . . but for the rest (how to get this data to the Dialog) I will pass you along to Dane, our WikiBlocks expert.
I worked on a lot of the WikiBlock code during my internship two summers ago, and I agree, we could definitely be doing a better job of explaining the relationships between (and functionalities of) the WikiBlock, WikiBlockPlugin, and WikiBlockManager classes. I've filed some cases against myself to make this clearer and to also do some refactoring.
To answer your question, no, currently there isn't a better way of making the ixWikiPage available to your insert dialog. You can make do with a custom WikiBlockManager if you need to pass along the ixWikiPage to a WikiBlock when it's being rendering (as per the stackexchange question Brett linked to), but not for not-yet-created WikiBlocks (i.e., when inserting a new WikiBlock). This is a bug in our API and we'll definitely be working to fix it soon.
The underlying problem is that WikiBlockManager does a bunch of magic during WysiwygInsertMenuDialogDisplay that isn't very well exposed to plugin developers.
If there's anything else we can help with though, please let us know!
This topic is archived. No further replies will be accepted.Other recent topics