From ARK
Revision as of 07:40, 6 July 2009 by Stuarteve (talk | contribs)

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="
  • 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:

Transcluding Filter Results

As of v0.7 (currently in SVN) it is possible to transclude results of saved filters as well.

<object type="text/html" data="

This works in the same way as transcluding a subform except you can specify which saved filter and what output mode you want.

  • transclude=filter - this is essential to let the transclude script know you are transcluding a filter
  • filter=whorls - this can either be the saved name of the filter (i.e. 'whorls' or 'All Contexts') or it can be the number of the filter as saved in cor_tbl_filter.
  • output_mode=tbl - the output modes are 'tbl', 'chat' or 'map'