Lucianin
Member
Hello.
I have a second doubt of the day (sorry).
Context: I have several "new threads" widget that are not shown to guests, because I want them to see the title, but not the content. So xenforo, despite having the option to only hide the content enabled, for some reason it does not show it in the widgets.
In front of that, it is that I found the option to hide the content superior to x words.
The problem: I have to modify the template and it modifies all themes, and I only want to hide it on certain nodes. So I don't know how to apply it for given number of nodes.
Template is
The original lines are:
And i need to change to:
The nodes where I want to hide the messages are for example /xxxxx.1 or /xxyyy.24
Can you help me?
Thank you very much and sorry friends for bothering you so often.
I have a second doubt of the day (sorry).
Context: I have several "new threads" widget that are not shown to guests, because I want them to see the title, but not the content. So xenforo, despite having the option to only hide the content enabled, for some reason it does not show it in the widgets.
In front of that, it is that I found the option to hide the content superior to x words.
The problem: I have to modify the template and it modifies all themes, and I only want to hide it on certain nodes. So I don't know how to apply it for given number of nodes.
Template is
Code:
post_macros
The original lines are:
HTML:
<article class="message-body js-selectToQuote">
<xf:if is="$displayAds">
<xf:ad position="post_above_content" arg-post="{$post}" />
</xf:if>
<xf:if is="$snippet">
{{ bb_code_snippet($post.message, 'post', $post, $snippet) }}
<xf:else />
{{ bb_code($post.message, 'post', $post) }}
</xf:if>
<div class="js-selectToQuoteEnd"> </div>
<xf:if is="$displayAds">
<xf:ad position="post_below_content" arg-post="{$post}" />
</xf:if>
</article>
And i need to change to:
HTML:
<article class="message-body js-selectToQuote">
<xf:if is="$displayAds">
<xf:ad position="post_above_content" arg-post="{$post}" />
</xf:if>
<xf:if is="!$xf.visitor.user_id">
<xf:set var="$snippetPost" value="{{ snippet($post.message, 10) }}" />
{{ bb_code($snippetPost, 'post', $post) }}
<div class="blockMessage blockMessage--important blockMessage--iconic">
Para ver el contenido oculto, por favor, <a href="{{ link('login') }}" data-xf-click="overlay">{{ phrase('log_in_or_register_now') }}</a>
</div>
<xf:else/>
{{ bb_code($post.message, 'post', $post) }}
</xf:if>
<div class="js-selectToQuoteEnd"> </div>
<xf:if is="$displayAds">
<xf:ad position="post_below_content" arg-post="{$post}" />
</xf:if>
</article>
The nodes where I want to hide the messages are for example /xxxxx.1 or /xxyyy.24
Can you help me?
Thank you very much and sorry friends for bothering you so often.