Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Displaying latest thread on the front page?
xskillz
New
I was wondering if it was possible (perhaps an addon?) to have the latest forum thread displayed on the home page of the forum.
Sorry I'm still relatively new to vanilla and don't know much about coding.
0
Comments
This would be possible, but I couldn't think of any nice way to represent it to the user. What is your home page? /categories? /discussions? Imagine it is a discussion with multiple pages - would it really be useful to show that discussion beneath a list of 30 recent discussion?
Maybe you could post a draft of what you are thinking of
Do you want only the latest thread on the home page?
Extend the discussion controller and only grab the last used discussion. Set the view to be the index and no extra coding/theming should be necessary.
If you are looking to see a list of posts on the frontpage in the side bar, check out Latest Post List here: http://vanillaforums.org/addon/latestpostlist-plugin
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Not quite sure if I understand that...
Starting code below to explain what I said:
Now we have a Vanilla path at '/discussion/latest`. It pulls the last discussion via the model and calls the index function. We set the view explicitly so we don't have to create our own theme.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Clever! I thought it should be shown additionally to something else - which wouldn't make much sense - but your solution looks like it should be made a small plugin
@hgtonight
thank you. I was looking similar to that.