enduro_admin icon indicating copy to clipboard operation
enduro_admin copied to clipboard

Templatitator not working below top level.

Open brennhill opened this issue 8 years ago • 2 comments

If you use the following code:

{
    $animal_types_hidden: true,
    animal_types: {
        dog: {
            $animal_type_type: 'title',
            animal_type: 'dog',
            name: '',
            barks: false
        },
        parrot: {
            $animal_type_type: 'title',
            animal_type: 'parrot',
            name: '',
            talks: false
        },
    },
    $animals_templatitator: '@@animal_types',
    animals: [],
}

The templates will work. However, if you change your code to the following:

{
   animal_section: {
    $animal_types_hidden: true,
    animal_types: {
        dog: {
            $animal_type_type: 'title',
            animal_type: 'dog',
            name: '',
            barks: false
        },
        parrot: {
            $animal_type_type: 'title',
            animal_type: 'parrot',
            name: '',
            talks: false
        },
    },
    $animals_templatitator: '@@animal_types',
    animals: []
  }
}

The templates fail.

brennhill avatar Nov 05 '17 10:11 brennhill

Can you share flat db file and location from the cms folder and the hbs files from the pages folder where you are calling the templates for each so we can see how they are being called to troubleshoot?

rnlambert7 avatar Dec 21 '17 21:12 rnlambert7

I don't think so at this point, since I'm not working on that project. Ideally, we should log malformed files or things that look like templatitator items, etc. I think a lot more logging through the app would be a good thing.

On Thu, Dec 21, 2017 at 4:29 PM, Nick Lambert [email protected] wrote:

Can you share flat db file and location from the cms folder and the hbs files from the pages folder where you are calling the templates for each so we can see how they are being called to troubleshoot?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Gottwik/enduro_admin/issues/20#issuecomment-353462177, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtzN4U-u6HrQDoTy6W27XPu7FFIlT5Jks5tCs2ggaJpZM4QSVfQ .

brennhill avatar Dec 22 '17 00:12 brennhill