Editing the article's author, date, and timestamp Follow

Comments

23 comments

  • Avatar
    Anthony de Bruyn

    How can I change the published date of individual articles? I am migrating our blog content to Zendesk and would like to timestamp some posts in the past.

  • Avatar
    Laura Hippert

    Hi Anthony!

    The date helper will only display an automated date, based on when the article was created or updated. However, if you wanted to override the date helper for a few select articles, You could implement something like the following:

     <div class="article-updated meta-data">
    {{#is article.id 115002323527}}
    {{t 'updated'}} 2 Years Ago

    {{else}}
    {{t 'updated'}} {{date article.updated_at format="full"}}

    {{/is}}

    You would implement the #is helper to add a manual date (in my example I said "2 Years Ago") for the article that matches the ID that you have referenced. You would need to repeat the #is statement for each migrated article. Once you have done that, the else statement determines that the date helper is used for all other articles, that aren't specifically called out. I hope that helps!

  • Avatar
    Anthony de Bruyn

    Awesome, it works! Thank you!

  • Avatar
    Anthony de Bruyn

    Hello Laura, I was cheering a bit too soon unfortunately ... I'm getting a syntax error when repeating the #is statement:

    <ul class="article-updated meta-data">
    {{#is article.id 115000491434}}
    {{t 'updated'}} 2017-06-02
    {{#is article.id 115000559053}}
    {{t 'updated'}} 2017-06-01
    {{else}}
    {{t 'updated'}} {{date article.updated_at timeago=true}}
    {{/is}}
    </ul>

    What am I doing wrong?

  • Avatar
    Laura Hippert

    Hi Anthony! What you'll actually need to do is close out each individual #is statements at the end, which is why you are getting the syntax error. You'll also want to include the else after each statement, so we can nest them. It will look something like this:

    <ul class="article-updated meta-data">
    {{#is article.id 115000491434}}
    {{t 'updated'}} 2017-06-02
    {{else}}
    {{#is article.id 115000559053}}
    {{t 'updated'}} 2017-06-01
    {{else}}
    {{t 'updated'}} {{date article.updated_at timeago=true}}
    {{/is}}{{/is}}
    </ul>

    Basically, this allows you to nest multiple #is statements, while maintaining one #else statement for the whole lot. 

    Does that help?

  • Avatar
    Anthony de Bruyn

    Works like a charm, thanks!

  • Avatar
    Heather R

    Great article! We commented out the parts we didn't want to display so that we can add them back in easily if we change our minds.

    Thanks again.

  • Avatar
    Stephen

    How is the 

    {{t 'updated'}}

    field handled for different languages? I think this is not our own configuration, but if we wanted to change it, is the only option through Dynamic Content management? Specifically we find that the Spanish should be Actualizado instead of Actualización. Could Zendesk consider a universal update?

  • Avatar
    Diogo Maciel

    Hi Stephen!

     

    While this is not currently in our roadmap, it could be implemented in the future. Please make a post in our Product Feedback page, which is checked constantly by our developers when defining our future updates

     

    https://support.zendesk.com/hc/en-us/community/topics/200132066-Product-feedback

     

    Cheers!

  • Avatar
    Stephen

    Sure - but I find it utterly ridiculous that I am paying you for a service, giving you feedback, and you are asking me to send my feedback again elsewhere. The Product Feedback page has 83 pages of ideas: some 2400 product feedback submissions. As a customer, I don't feel very well heard or valued throwing my feedback into a seemingly disorganized pot, nor do I want to try to organize my feedback on your behalf. In my opinion, if you value my feedback, you will handle the feedback yourself.

  • Avatar
    Jessie - Community Manager (Edited )

    Hi Stephen!

    Thank you so much for sharing your input on this.

    I agree with you - the current process for collecting customer feedback and suggestions in the Community is far from ideal. The Product Feedback forum was started back when we were small, scrappy little start-up, and as we've grown the processes we put in place then have not aged well as we've grown.

    I spent a considerable amount of time over the last couple years working with the former Director of Product Management to understand the needs and pain points of the people who use the Product Feedback forum, including going to San Francisco to meet with our PMs at their annual summit, and Nicole is now working with our PMs and Voice of Customer team to continue those conversations.

    We've already implemented several new processes and policies to improve the experience of both our customers and our Product Managers, including aggregating thread information to pass along to Product Managers, consistent monitoring and updating of threads, content management to reduce duplicate and outdated posts, and starting pro-active conversations led by our PMs for customers to share their use cases.

    I completely understand why you don't want to re-post your suggestion in Product Feedback; asking our Community Members to re-post their feedback in another part of the Community increases the effort they have to put in, and we don't like having to do it. Unfortunately, our platform doesn't let us move thread comments to other parts of the Community; otherwise I would be happy to do that for you.

    I can definitely bring your feedback to the attention of the right folks; what I'm reading is that the {{t 'updated'}} placeholder is rendering something grammatically incorrect in Spanish. Am I understanding that correctly?

     

  • Avatar
    Stephen

    Thank you for the understanding and insight into the Product Feedback developments, Jessie. Much appreciated. 

    Yes, you are understanding correctly that I am concerned that the {{t 'updated'}} placeholder is rendering something grammatically incorrect in Spanish.

  • Avatar
    Jessie - Community Manager

    Thanks for verifying, Stephen!

    I'll pass that along to see if we can get that corrected on our end. Have a great weekend!

  • Avatar
    Merav B

    Hi Jessie,

    I was trying to change the date on the search results template page, because I'd like the date that the article was updated to appear on the search results, rather than the date it was created because many articles were created 2-3 years ago, but are constantly updated and still relevant. Users won't trust to click on a search result for an article 3 years old, even though it was updated 1 month ago.

    I am getting an error when I make the following change from "created_at" to "updated_at"

    Can you please assist me on this? thanks! 

  • Avatar
    Jessie - Community Manager

    Hi Merav!

    Offhand, it looks like your syntax is a bit off. Try this:

    {{date article.updated_at timeago=true}}
  • Avatar
    Merav B (Edited )

    Thank you Jessie

    I tried that and it still get the same error as above "invalid reference"

    Anything else I can try?

    thank you

     

  • Avatar
    Jessie - Community Manager

    Hey Merav!

    Hm...I think, in that case, that you're having trouble because that placeholder can't be used on the search page. You'll probably need to use some JS to make those changes. Let me check with some of our Community Moderators; they should be able to help you out!

  • Avatar
    Trapta

    Hi @Merav B,

    Try using this -

    {{date edited_at timeago=true}}

    Team Diziana

  • Avatar
    Merav B

    Thank you @Trapta ! 

    That worked.

    Merav

  • Avatar
    Hillary Deal

    I tried this, and it worked for articles recently created/updated, but articles that we merged from our old Zendesk are not being affected. Thoughts?

     

  • Avatar
    Jessie - Community Manager

    Hi Hillary!

    I'm not sure why that would be the case. Can you give me more information about what exactly you're encountering here? How did you migrate that content?

  • Avatar
    Hillary Deal

    Well, it turns out not all new articles are updating with "updated date" as I previously thought (it was basically only 1. lol) I am not sure how our content was migrated over. That was done before I began working with this company. However, my goal is to show the updated "date" on the category page.

  • Avatar
    Ray Roth

    Hey Hillary,

    Unfortunately customizing the default theme code it outside the scope of support we provide, however our community is a great place to ask questions like this as many of our other users often have good feedback. 

Please sign in to leave a comment.

Powered by Zendesk