Example: how to set up a uri

alangrafu edited this page Feb 21, 2012 · 5 revisions
Clone this wiki locally

Defining a model query and view template for a specific URI can be useful (for example if I know there is more information about a specific person --a particular URI-- than the rest). It is important to remember that a namespace for that URI must be defined, as it is usual in LODSPeaKr. We will use utils/lodspk.sh again:

/var/www/datafaqs/DataFAQs-lodspeakr$ utils/lodspk.sh create uri local:alvaro
...
uri.local:alvaro created/modified successfully!

Similar to what occurred setting up a type, we will have a new model query structure

models/
      |
      ->uri.local:alvaro/
                        |
                        ->html.queries/
                                      |
                                      ->main.query

As well as a new view template

views/
     |
     ->uri.local\:alvaro/
                        |
                        ->html.template

What's next?