XF 2.2 how to make node list area clickable?

securedme

Active member
Currently I need to get into the node by clicking on the node name. How can I make the whole blank area clickable so I can also go to the node by clicking the blank area.

1695386806845.webp
 
Solution
In the node_list_forum template, find

Code:
<div class="node-body">

and change it to

Code:
<div class="node-body fauxBlockLink">

Then, in the same template, find

Code:
<h3 class="node-title">
    <a href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
</h3

and change it to

Code:
<h3 class="node-title">
    <a class="fauxBlockLink-blockLink" href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
</h3>

If you have other node types, you may need to make the same changes in these templates too...
In the node_list_forum template, find

Code:
<div class="node-body">

and change it to

Code:
<div class="node-body fauxBlockLink">

Then, in the same template, find

Code:
<h3 class="node-title">
    <a href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
</h3

and change it to

Code:
<h3 class="node-title">
    <a class="fauxBlockLink-blockLink" href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
</h3>

If you have other node types, you may need to make the same changes in these templates too:

node_list_category node_list_link_forum node_list_page node_list_search_forum

Keep in mind that when you do this, it will have negative affects on the tooltip if you're displaying the node descriptions in a tooltip overlay. Hovering anywhere over the block will cause the tooltip to pop up. Someone else might have a better solution that will stop that from happening, but this is something that I believe will work for you.
 
Solution
Back
Top Bottom