Getting link counter to work in Search.php

Started by spiros, October 02, 2021, 02:31:09 PM

Previous topic - Next topic

spiros

I am trying to use $link['counter'] in Search.php like this:

'link' => '<a href="#ref_' . $link['counter'] . '" aria-label="Jump up" title="Jump up"><i class="fas fa-angle-up"></i></a> <a href="' . $scripturl . '?topic=' . $message['id_topic'] . '.0" target="mytargeta">' . $message['first_subject'] . '</a>',

So that this bit

' . $link['counter'] . '"
Produces the number for the respective go to topic anchor on top. The html output indicates that it is not parsed:
<a href="#ref_" aria-label="Jump up" title="Jump up"><i class="fas fa-angle-up"></i></a>
For the time being I use a generic anchor to the first topic (#ref_1) in all cases. Test search results

Steve

DO NOT pm me for support!

Bugo


spiros


Advertisement: