Transcluding

From ARK
Revision as of 09:59, 4 July 2008 by 91.124.173.148 (talk)

Jump to: navigation, search

Elements of ARK can be 'transcluded' - that is you can make a live query to your ARK and bring back the results of a Subform.

What this means is that subforms of a particular item (e.g a context) can be included in any other webpage - for example if you are entering an online blog and you want to show the photos of the special find you recovered today - then you can just include them and they will show up just as they show up when viewing them in ARK.

This starts getting very useful when you begin to think about a running site narrative, built within a webpage/blogging software/google documents. So when you are talking about the local matrix of a context - you can just transclude it straight into the document. Because this is running a live query against the database, you are getting the most up-to-date data and it will change as the original data is changed.

Its very easy to transclude in ARK. All you need to do is ensure whatever application you are in (e.g. Mediawiki, Blogger, TextPattern, etc.) can read raw html and the include the following in your page:

<object type="text/html" data="http://192.168.0.61:8080/ark/transclude_object.php?transclude=yes
  &sf_conf=conf_mcd_spat
  &sf_key=cxt_cd
  &sf_val=CH05SR_699
  &width=100%
  &height=100%">
  </object>
  • The web address that you put in the data field should point at your own version of ARK.
  • The sf_conf value is the name of the subform that you want to transclude - if you don't know this then you should contact your administrator.
  • The sf_key and sf_val are the itemkey and itemvalue of the item that you want to transclude. In this case we are transcluding the spatial subform for Context CH05SR_699.

The results of this can be seen below:

<shtml hash="4216e8ab58b628eba99997321c609991"><object type="text/html" data="http://192.168.0.61:8080/ark/transclude_object.php?transclude=yes&sf_conf=conf_mcd_spat&sf_key=cxt_cd&sf_val=CH05SR_699&width=100%&height=100%">test</object></shtml>