php - SilverStripe 'None of these templates can be found in theme 'default' -


i have widget has 2 templates. eligibilitywidget.ss , eligibilitywidget_shortform.ss .

i running code

public function init() {     $cookie = (cookie::get('__utmz'));      if (isset($cookie)) {         return $this->renderwith('eligibilitywidget_shortform');     } else {         return $this->renderwith('eligibilitywidget');     } } 

this should identify if cookie exists , render information correct template. however, when run error message:

[user warning] none of these templates can found in theme 'default': widget.ss, dataobject.ss, viewabledata.ss, object.ss

i have tried changing line of code

return $this->renderwith(array('eligibilitywidget_shortform', 'widget')); 

however returned same error. appreciated, thank you.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -