About Guide templating versions

Return to top
Have more questions? Submit a request

14 Comments

  • Rona Yang

    I'm trying to upgrade my template to V2- I've replaced all of the deprecated helpers, but have the following 3 errors left...  how do I go about fixing this? 

     

     

    0
  • Augusto Silva
    Zendesk team member

    Hi Rona,

    Happy to hear you're upgrading to V2.

    In V2, we have improved validation for helpers resulting in these errors.

    To solve this errors, you need to check if you are using these helpers together with a conditional.

    You shouldn't need to use conditionals with these helpers as they render HTML only when available.

    Hope this helps

    0
  • Rona Yang

    Hi Augusto Silva - do you mean I should just be able to delete this line of code? It was a developer who created a new template for us, so I don't have any background on what they did. How can I check if these helpers are being used with a conditional? 

    0
  • Augusto Silva
    Zendesk team member

    Hi Rona,

    You'll need to remove the {{#if in those lines. You can check the Copenhagen theme template as an example.

    I would also suggest reaching out to the developer to see if there's a new version of the theme using V2 or if they can help you out with the upgrade.

     

    0
  • Chen Arbel

    Hi Augusto Silva, in continue to Rona's question.

    I removed the "if"/"isn't" to resolve the errors, but isn't if affect the theme's logic somehow?

    Additionally, Some CSS is breaking on the new version, are you aware of CSS bugs? I.e 'follow' button on the new version has the SAME CSS as in the old one, but it looks like it doesn't apply.

     

    Thanks! Chen

    0
  • Chen Arbel

    Hi Augusto Silva, have you had a chance to check my question?

    thanks!

    0
  • Luis Almeida

    Hi Rona,

    The helpers already encapsulate that logic so there is no need for the "if", "is" or "isn't" blocks. 

    Regarding the theme CSS, we could not possibly push updates to the stylesheet safely so it is up to the theme customizer to implement the necessary changes.

    0
  • Chen Arbel

    Luis Almeida

    How do I access the HTML of a follow button?

    Can't see it under templates 

    0
  • Luis Almeida

    The follow button (subscribe helper) really is just a button so that's all there is to style. It can be targeted by rendering it inside a div with a class of your choosing:

    <div class="article-subscribe">{{subscribe}}</div>

    And then with CSS:

    .article-subscribe button { /* button styling */ }

     

    The dropdown it renders when there are multiple subscription options is something that should not be targeted with styling as it's an internal piece of UI that might change in the future.

    0
  • Chen Arbel

    Luis Almeida Thanks for the answer but I'm searching for a solution without touching the css. 

    How do I edit the HTML markup of the follow button?

    I have all the hbs files, where I can see markup but not foe the clas you mentioned...

     

    thanks again

    0
  • Chen Arbel

    Luis Almeida

    ill accurate my question - I would like to add an attribute rolr="button" to the following button.

    Since it inherits all css automatically. 

    i can't see under ''subscription_page.gbs" any HTML related to the follow button. how do I find it?

     

    thanks

     

    1
  • Luis Almeida

    The HTML output of the subscribe helper cannot be modified. So the button can no longer be targeted by the role attribute and the easiest way is how I described in my previous comment.

    The subscribe (follow) behaviour is now optimized for accessibility and that's why it is a bit more restrictive in terms of customization.

    0
  • Chen Arbel

    hi Luis Almeida

     

    can you please see Rona's errors again?

    for some of the deprecated helpers, you didn't mention the new ones here: https://developer.zendesk.com/apps/docs/help-center-templates/v1

     

    How can I know with what new helpers they should be replaced?

    I really can't build all the CSS from scratch... 

    0
  • Luis Almeida

    It's a bit hard for me to give more directions at this point without looking into the specific errors.

    Only the deprecated helpers need to be removed from the theme when upgrading. If there are styling issue with the helpers that have changed with improvements for accessibility, those need to be addressed with CSS.

    We recommend looking into the Copenhagen theme source code as guidance when applying these changes.

    0

Please sign in to leave a comment.

Powered by Zendesk