XF 2.2 Public Navigation link search string

Ludachris

Well-known member
Trying to create a Link for the public navigation that is a predefined search link that takes the member browsing to search results with threads they started in a specified forum. The forum ID is 205. Pretty sure the user criteria is $xf.visitor.username but not sure about the forum criteria and how to structure the link to work in the public navigation Link field.
 
Last edited:
Actually, this is better as the above results in a broken link when the tab is focussed (if you're using a tab).

Code:
{{ link('forums', {'title': 'Main forum', 'node_id': 2}, {'starter_id': $xf.visitor.user_id}) }}

Again, thanks to @Jeremy P for the syntax foo!
 
Actually, this is better as the above results in a broken link when the tab is focussed (if you're using a tab).

Code:
{{ link('forums', {'title': 'Main forum', 'node_id': 2}, {'starter_id': $xf.visitor.user_id}) }}

Again, thanks to @Jeremy P for the syntax foo!
If there are two forums that need to be included (one being a subforum of the other) how would you structure that link? And thanks @Jeremy P - well done.
 
If memory serves, I think you can only search for threads across the entire board, or for posts within a node and its children. While you can group the latter by threads, that would include threads started by anyone which contain a post from the member. I don't think functionality to filter for started threads within a node and its children is exposed anywhere.
I was able to get the results to display only the threads I've posted in a specific node so it looks like that should work, it just won't include threads in the child node. Not ideal but fine for now.

Curious, what does this code in the link mean? 'title': 'Main forum'

Thanks again to you both.
 
Top Bottom