doufeinai6081 2015-07-20 22:37 采纳率: 0%
浏览 29

SilverStripe FullTextSearch更改模板renderWith

I can't seem to change the templates that the results function uses. I've taken the results function and modified the template but it's rendering with Page.ss instead of MyCustomResultTemplate.ss

public function results($data, $form, $request)
{
    // [...]

    $templates = array(
        'MyCustomResultTemplate',
        'Page'
    );

    return $this->owner->customise($data)->renderWith($templates);
}

MyCustomResultTemplate.ss exists in the correct templates folder and looks identical the the default Page_results.ss file yet still no luck.

Am I missing some route setting or something here?

  • 写回答

0条回答 默认 最新

    报告相同问题?