Davyc Posted August 4, 2020 Posted August 4, 2020 (edited) Need help with this, if it is at all possible, I'm wanting to add a snippet (no more than 3 lines) of the text that appears in a topic into the topic list: See below for example: This is a section of the topic list in a forum: Below is what is inside the topic: The orange arrow is pointing to the text I want to include in the topic list, but no more than 3 lines regardless of how much text is in the topic. Mock-up is below: This is going to be a template edit, but what do I put into which template to get this effect, if indeed it is at all possible? With thanks Edited August 4, 2020 by Davyc
Nathan Explosion Posted August 4, 2020 Posted August 4, 2020 4 hours ago, Davyc said: This is going to be a template edit, Pretty sure it's not going to be that simple - what you are asking is for the "Content" of the first post, which is not included in the SQL query which results in the data available for the topic listing. "Content" becomes available when the topic is read. Why? Well, why return the "Content" of the topic when it's not needed? Think about the potential size of that data set if the "Content" was a 10,000 word essay. I reckon you're going to need a plugin which does the following: 1) Parses the "Content", strips HTML, truncates it to X number of characters 2) Adds that to the data set returned to the template 3) Modifies the template to display the parsed content Davyc 1
Davyc Posted August 4, 2020 Author Posted August 4, 2020 37 minutes ago, Nathan Explosion said: Pretty sure it's not going to be that simple I figured that lol. I had a look at the templates, and it was something beyond my reckoning. Seems like a lot of work just to add a few lines of text, but if it can be done I'm happy to pay someone as long as it isn't a huge sum as I have a very limited budget 🙂
bfarber Posted August 5, 2020 Posted August 5, 2020 I replied to your other topic where you asked about this. Davyc 1
Recommended Posts