RM 2.2 Removing the Share this resource field from the sidebar

SelamT

Active member
Hello,

I want to remove the share this resource field from the sidebar and position it in the main field on the left, for example, under the "Like" field. Is this possible?

1676841850070.webp

Or if I want to hide this field completely, how can I do that?

Thanks,
 
Hello, in xfrm_resource_view template, find and comment this part (put it between <!-- and --> tags):
HTML:
<xf:if contentcheck="true">
    <div class="resourceSidebarGroup">
        <h4 class="resourceSidebarGroup-title">{{ phrase('xfrm_share_this_resource') }}</h4>
        <xf:contentcheck>
            <xf:macro template="share_page_macros" name="buttons" arg-iconic="{{ true }}" />
        </xf:contentcheck>
    </div>
</xf:if>

Find:
HTML:
<xf:if is="$description.edit_count && $description.canViewHistory()">
    <div class="js-historyTarget toggleTarget" data-href="trigger-href"></div>
</xf:if>

And add below:
HTML:
<xf:if contentcheck="true">
    <xf:contentcheck>
        <xf:macro template="share_page_macros" name="buttons" arg-iconic="{{ true }}" />
    </xf:contentcheck>
</xf:if>
 
What the browser console says ?
Sorry, I don't understand exactly what you mean :(
It may be modsecurity tripping on it. I would contact your host and see if they can see modsecurity logs to verify.
I will look into this as soon as possible, thank you.


As a result, I could not do what was said in message #2.
But when I deleted the area to be changed instead of <!-- --> and moved it to the specified area, the entire sidebar was transferred to that area. Not just the "share this resource" area...
 
I did what you said and when I say "save", the error screen below appears and does not allow me to save my changes. Interesting.
There is a priori no link between this error message and the modification of the template.

Sorry, I don't understand exactly what you mean :(
CTRL + MAJ + i on your keyboard when the error message is displayed then choose the console tab.

Capture d'écran_20230220_093611.webp

As a result, I could not do what was said in message #2.
If the template is original and you haven't made any other changes then replace all the content with the code in attachement.
 

Attachments

Top Bottom