XF 1.4 My content, display results as threads in navbar

aana

Active member
hey,

i would like to know how to add a navbar link : My content ( but display results as threads ).

Did someone know ?

Thanks :)
 
If I understand you correctly...

Add this link to where you need it. This is the link only without any other tags or classes, you will have to add those to match it's location.

Code:
<a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}" rel="nofollow">{xen:phrase your_content}</a>

And either change the phrase "your_content" to display "My Content" or create a new phrase instead and replace it in this line of code.
 
Yes, the link I gave you will display all the threads that you have created and is effectively the same search request that you have shown in your image.

I have changed my navbar completely, so I can't really say where exactly you would have to put the link, but it will either be in the navigation template or the navigation_visitor_tab template depending on where you want it to show up.
 
Ho ok,

i am looking to have all the posts i did display as thread, even when i didn't created the thread. All my post but not display as message.
 
If I understand you correctly...

Add this link to where you need it. This is the link only without any other tags or classes, you will have to add those to match it's location.

Code:
<a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}" rel="nofollow">{xen:phrase your_content}</a>

And either change the phrase "your_content" to display "My Content" or create a new phrase instead and replace it in this line of code.
I have a similar link in my nav bar that used to work but for some reason it is not working now - when I click the link myself the results are empty. I'm using Elastisearch and have rebuilt the search index a few weeks back. Does this mean I have to rebuild the search index again?
 
If I understand you correctly...

Add this link to where you need it. This is the link only without any other tags or classes, you will have to add those to match it's location.

Code:
<a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}" rel="nofollow">{xen:phrase your_content}</a>

And either change the phrase "your_content" to display "My Content" or create a new phrase instead and replace it in this line of code.
This is the correct code to place in the navigation template:
Code:
<xen:if is="{$visitor.user_id}">
         <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}" rel="nofollow">{xen:phrase your_content}</a></li>
</xen:if>
 
This is the correct code to place in the navigation template:
Code:
<xen:if is="{$visitor.user_id}">
         <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}" rel="nofollow">{xen:phrase your_content}</a></li>
</xen:if>
That will return all threads started by the member... what if it's not returning more than a few threads? Which cache should be rebuilt? Search? User? Threads?
 
Top Bottom