Recent searches


No recent searches

excerpt for promoted_articles



Posted Dec 23, 2024

I am trying to get the excerpt for promoted_articles, but I get an error  not possible to access `article` in `article.body`. Added the code as in the excerpt-helper in the manual.

{{#each promoted_articles}}
   {{title}}
   {{url}}
   {{excerpt article.body characters=100}}
{{/each}}

{{title}} and {{url}} work. What am I doing wrong? 


0

4

4 comments

image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Alex!

 

I'm wondering if the issue is that you're already “inside of” the promoted_articles object and perhaps don't need to specify the `article` portion in the excerpt. If you haven't already, could you try using `{{excerpt body characters=100}}` and let me know the results?

0


Hi Greg Katechis ,

I found the same problem that Alex mentioned.  I also already tried using {{excerpt abody characters=100}} and the error is simply that ‘body’ doesn't exist.  I then tried this on an older template (V 2.xx) and it did work, so I wonder if something has broken with the new v4 template?

0


Same issue here. Would appreciate an update here, Greg. 

0


Hi @

 

Please, update your existing code with the code given below 

{{#each promoted_articles}}
   {{title}}
   {{url}}
   {{excerpt snippet characters=100}}
{{/each}}

The above code will solve your issue, if need any help please let me know

 

 

Thank You

Vishnuh

 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post