Sebobo / Shel.Blog

A simple blog based on Fusion and Yaml configurations without PHP requirements
MIT License
12 stars 14 forks source link

No template path set #13

Closed SimonErich closed 5 years ago

SimonErich commented 5 years ago

I am trying to get 5.0.0-beta to work. I have added it as you state in the readme and I can add a feed page. As a sub page I am adding the Blog article document type.

But on both pages I get the following error:


No template path set. Most likely you didn't configure `templatePath` in your Fusion object correctly. For example you could add and adapt the following line to your Fusion: `prototype(Neos.Fusion:Template) < prototype(Neos.Fusion:Template) { templatePath = 'resource://Vendor.Package/Private/Templates/MyObject.html' }```

I am relatively new to neos, so I am really confused and the readme doesn't really say anything about additional steps to take to get it working.

Any help would be appreciated :)
SimonErich commented 5 years ago

btw: this is my Root fusion file:

/**
 * Root Fusion for the DemoPage.eu site
 */

prototype(CZ.DemoPage:DefaultPage) < prototype(Neos.Neos:Page) {
    head {
        meta = Neos.Fusion:Template {
                templatePath = 'resource://CZ.DemoPage/Private/Templates/Page/Default.html'
                sectionName = 'meta'

                title = ${q(node).property('title')}
        }

        stylesheets.site = Neos.Fusion:Template {
            templatePath = 'resource://CZ.DemoPage/Private/Templates/Page/Default.html'
            sectionName = 'stylesheets'
        }

        javascripts.site = Neos.Fusion:Template {
            templatePath = 'resource://CZ.DemoPage/Private/Templates/Page/Default.html'
            sectionName = 'headScripts'
        }
    }
    body {
        templatePath = 'resource://CZ.DemoPage/Private/Templates/Page/Default.html'
        sectionName = 'body'
        parts {
            menu = Neos.Neos:Menu
        }

        main = Neos.Neos:PrimaryContent {
          nodePath = 'main'
        }

        javascripts.site = Neos.Fusion:Template {
            templatePath = 'resource://CZ.DemoPage/Private/Templates/Page/Default.html'
            sectionName = 'bodyScripts'
        }

        footerparticipation = ContentCollection {
            nodePath = ${q(site).children('footerparticipation').property('_path')}
            collection = ${q(site).children('footerparticipation').children()}
        }

        footercontact = ContentCollection {
            nodePath = ${q(site).children('footercontact').property('_path')}
            collection = ${q(site).children('footercontact').children()}
        }

    }
}

page = CZ.DemoPage:DefaultPage

include: NodeTypes/*.fusion
include: NodeTypes/**/*
Sebobo commented 5 years ago

Ok, I could reproduce, I'll work on a fix

Sebobo commented 5 years ago

Hi @SimonErich please try 5.0.0-beta2. I also updated the readme with a hint on how to set up page rendering, which you should follow.

I assume you need something like the following code on your site package:

prototype(Shel.Blog:Document.GenericBlogPage) < prototype(Neos.NodeTypes:Page)

Thanks a lot for testing and finding this very grave issue!

SimonErich commented 5 years ago

That worked perfectly well. Thank you very much for your help :) :+1: