@julian thanks that's good to know.
I'll do as @pichalite recommended and fork the theme then.
Thanks!
Edit teaser text
-
I've modified topics_list to display the teaser under the title. However, i would like to further edit the teaser. I'm wondering about the best approach to do something like this. I'm thinking
-
What kind of changes do you want to do?
-
There's two things i want to do.
- Shorten the teaser text
- Pull out a specific link to use as a button
I think i figured it out though using something like
{ "hook": "filter:topics.get", "method": "teaserContentShort" }
var Theme = { teaserContentShort: function (data, callback) { data.topics.forEach(topic => { topic.teaser.contentShort = topic.teaser.content.slice(0,20); }); callback(null, data); } };
It seems to work. Hopefully thats not using the wrong paradigm.