(ZAF v1) Building your first Zendesk app - Part 3: Creating and inserting templates Follow

Comments

8 comments

  • Avatar
    Till Kothe

    I'm trying to add an image from my assets folder into a template. I tried both, the direct way through as well as CSS, background-image and app-asset-url(). However, I can get none of those to display the image :-(

    I'm currently testing with zat, in case that makes any difference.

  • Avatar
    Olaf Kwant

    Assuming image.png is sitting in your assets folder, the following will work:

       

  • Avatar
    Till Kothe

    Thanks Olaf!

    And for everybody else who is too blind to find it as I am... here's the reference

    https://developer.zendesk.com/apps/docs/agent/templates

     

     

  • Avatar
    Muaad Abdirahman

    Hi,

    Am following this tutorial and, after adding the 'requester' template, I keep getting this error:

    Assertion failed: No such template: requester

    Here is a screenshot: http://grab.by/K9VU

    I don't understand what is going on. I have the template and am adding it in the JS file as well. Any suggestions, please?

  • Avatar
    Olaf Kwant

    You have a 'requester.hdbs' in your 'templates' directory?

  • Avatar
    Muaad Abdirahman

    Hi Olaf,

    Thanks for the response. Yes. I have 'requester.hbds' in my templates directory. I wasn't using this.template('requester') but instead, I was using this.switchTo('requester') as I found in this article.

    I switched to this.template('requester') but am still getting the same error.

  • Avatar
    Olaf Kwant

    `requester.hbds` vs `requester.hdbs` sometimes it's the small things ;-)

  • Avatar
    Muaad Abdirahman

    Thanks Olaf. I would never have found it out on my own. Tried everything and almost gave up. Now works. Thanks.

Please sign in to leave a comment.

Powered by Zendesk