THL Toolbox > Developers' Zone > Ruby On Rails Development > RoR Apps and THL Wiki Links
Contributor(s): Jed Verity (email@example.com)
Additional links on using Wiki pages in THL:
- Formatting For Wiki Pages Used As Thdl Content
- Creating A Thdl Page With All Wiki Content
- Linking To Wiki Pages Used As Thl Content
Then, in class_external.js, where the wiki ajax happens, the DoAjax function has been modified to look for the presence of "tmb" or "places" in the hostname (so this will eventually need to be modified to look for other Rails app signifiers, and should in fact be broken out into a universal function, since multiple functions look for this), and if found, instead of looking for wiki_reader.php locally and ajaxing in content from there, it creates a hidden iframe to call wiki_reader.php. Since the document.domain property will be the same for the parent and iframe documents, the DOM of the child document can be read directly by the parent, which just pulls the iframe document content over into its #content div.
It goes without saying that this solution will not work if the Rails app does not have the same root domain (thlib.org or whatever) as the main THL site.