XF 2.2 Link_type, link [Solved]

Robert9

Well-known member
{{ link_type('public', 'threads', $thread) }}

will lead to <a href=".../threads/{thread_title}.{thread_id}"

How can I do the link to get this, please:

<a href=".../topics/{thread_title}.{thread_id}"
 
Hmmm, this works:

{{ link('spam-cleaner', $thread) }}

but this does not work:

{{ link('hihihaha', $thread) }}

Means that we have somewhere a list with "something" so this link works?
 
If I search for 'spam-cleaner'

$this->assertCanonicalUrl($this->buildLink('spam-cleaner', $user));


I found route
<route route_type="public" route_prefix="spam-cleaner" format=":int&lt;user_id,username&gt;/" build_class="XF\Pub\Route\SpamCleaner" build_method="build" controller="XF:SpamCleaner"/>


Why this works:

{{ link('spam-cleaner', $thread) }}

and this does not work?

{{ link('hihihaha', $thread) }}
 
Last edited:
Top Bottom