AKSW / site.ontowiki

HTML Content Publishing system on top of Linked Data
6 stars 7 forks source link

config helper for templates #23

Closed seebi closed 11 years ago

seebi commented 11 years ago

templateOption is not enough :)

seebi commented 11 years ago

I've added some test data to esp and the site schema:

query something like

SELECT ?key ?value
WHERE
{
  {
<%%resource%%> ?key ?value.
  } UNION {
<%%resource%%> a ?class.
?class ?key ?value.
    }
?key a site:TemplateOption .  
}

inside templates, it should be accessible like

$c => $this->getTemplateOptions($optional Resource URI);
$c->isKeyEq('site-width', 'default')
$c->getKey('site-width)

or a similar easy to use (for template developers) interface. Maybe Zend config can be used here as backend?

seebi commented 11 years ago

please discuss the interface first ...

kkda commented 11 years ago
$options = $this->templateOptions();
$vlaue = $options->getValue('site-width', 'default');