Skip to content

Default Values in Template

alangrafu edited this page Mar 16, 2012 · 8 revisions

By default, LODSPeaKr will provide values that can be used in templates. This values can be accessed using {{lodspk.VARNAME}}

Common values

  • {{lodspk.home}}: Defines where the LODSPeaKr is installed on the web. If it is installed in http://foo/bar/lodspeakr, {{lodspk.home}} will contain http://foo/bar
  • {{lodspk.root}}: The initial relative URL to which a client is redirected (e.g., index.html)
  • {{lodspk.ns}}: List of namespaces available
    • {{lodspk.ns.foaf}} will return http://xmlns.com/foaf/0.1/
  • {{lodspk.endpoint}}: List of endpoints available, similar to ns
    • {{lodspk.endpoint.local}} will return local SPARQL endpoint
  • {{lodspk.this.uri}}: Same as above
    • {{lodspk.this.curie}}: CURIE version of current URI
  • {{lodspk.local}}: Current local version of URI
    • {{lodspk.local.curie}}: CURIE version of local URI

Type, Static and URI modules

  • {{uri}}: Current URI.
  • {{lodspk.this.uri}}: Same as above
    • {{lodspk.this.curie}}: CURIE version of current URI
  • {{lodspk.local}}: Current local version of URI
    • {{lodspk.local.curie}}: CURIE version of local URI

Others

  • {% include "file" %} will include a local file.

What's next

Clone this wiki locally