Fork me on GitHub

News Template Override in 1.3  Bottom

  • I'm working on the 1.3 Version of the theme for my church's site, I'm to the part where I need to do some module template over-rides in the news module, specifically the storiesext block, how do I do this? I did it the way I'm used to, by putting the templates in the mirrored location in my theme, but that didn't work, then I noticed the overrides.yml in Andreas08, so I tried to use it to have it read the row.tpl in my theme by putting

    Code

    modules/News/templates/block/storiesext/row.tpl: themes/Peoples10/templates/modules/News/blocks/storiesext/row.tpl

    With that added, it clearly did something, because now I see:

    Code

    WARN (4): e_warning: file_get_contents(block/storiesext/row.tpl): failed to open stream: No such file or directory in lib/Zikula/View/Resource.php line 95
    WARN (4): e_warning: filemtime(): stat failed for block/storiesext/row.tpl in lib/Zikula/View/Resource.php line 118
    WARN (4): e_warning: file_get_contents(block/storiesext/row.tpl): failed to open stream: No such file or directory in lib/Zikula/View/Resource.php line 95
    WARN (4): e_warning: filemtime(): stat failed for block/storiesext/row.tpl in lib/Zikula/View/Resource.php line 118

    Where the block displays.. What else do I need to do?

    --
    Home Page | Find on Facebook | Follow on Twitter
  • I think you have an error in your code.... it should be

    Code

    themes/Peoples10/templates/modules/News/block/storiesext/row.tpl


    and not

    Code

    themes/Peoples10/templates/modules/News/blocks/storiesext/row.tpl


    (notice the s on the blocks)

    Some notes on the overriding...

    In order to do template overrides this way, you need to have in your config.php the following:

    Code

    $ZConfig['System']['compat_layer'] = false;


    Please note however that if you do this, all your modules must be zikula 1.3 native.

    However, if you have the compat_layer set to true, template overriding should work without the use of the .yml
  • Thanks, figured it was something so small I just wasn't seeing it or thinking about it. And the site is built on alll 1.3 native modules :) Thankfully the only module I used that in anyway "broke" was Files, and that is just a case of not playing around with it to get it to work how I want probably.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • 0 users

This list is based on users active over the last 60 minutes.