howdy folks!
I’m working on a project where I want to embed content from wiki pages directly into templates.
I couldn’t find any plugins to do this, so I whipped one up for myself.
Perhaps it’d be useful to others also…? (If so, see attached file!)
{exp:embed_from_wiki wiki="wikiname" page_name="Page Name" namespace="namespacename"}
(p.s. I’m no expert programming, and this is the first EE plugin I’ve produced. So, I’d appreciate whatever feedback anybody wants to provide, especially about the correctness, performance, and security of my code.)
Right now, the plugin requires a wiki shortname and a page name. You can optionally specify a namespace, but you must still also specify a wiki and a page.
The intent of this plugin is to display the content of an individual page, not to create a list of pages. However, Mark Bowen has a plugin called “Wikee Display” to create a list of recently created/edited pages. (see http://ellislab.com/forums/viewthread/90737/)
I know Mark mentioned that he was planning to add namespaces to the plugin, but I don’t know if he is still developing his plugin. (If not, maybe I’ll create a spin-off later in this project, when I’ll undoubtedly need some of that functionality.)
Meanwhile, my goal on this one was to emulate the template {embed …} functionality as closely as possible. However, if there’s other behavior you think would be useful, I’m happy to consider some additions…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.