• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Creating a sidebar widget with same appearance as other widgets

Neal

Well-known member
#1
I want to add a new sidebar widget that replicates the look of the other sidebar widgets. Could someone give me some basic guidance on how to do this please?
 

Brogan

XenForo moderator
Staff member
#2
Copy the basic structure from the sidebar_online_users template.

Code:
<div class="section myClass">
<div class="secondaryContent">
<h3>{xen:phrase my_block}</h3>
Content
</div>
</div>
 

Neal

Well-known member
#3
Copy the basic structure from the sidebar_online_users template.

Code:
<div class="section myClass">
<div class="secondaryContent">
<h3>{xen:phrase my_block}</h3>
Content
</div>
</div>
Thanks Brogan but do I create a new template and paste this in, etc?
 

Neal

Well-known member
#5
I've managed to add content to the ad_sidebar_bottom but i'm just confused creating a widget from scratch. When I created a copy of the ad_sidebar_bottom template and renamed it I somehow need to get it to appear on the sidebar....

Sorry to be a pest. Just wish this option was easier for someone who doesn't code.
 

Neal

Well-known member
#6
Basically i've created a widget for Twitter that works using the ad_sidebar_bottom template, I just want a widget below that one now for Facebook.
 

Neal

Well-known member
#8
This is what I have in my ad_sidebar_bottom template which works and i've created my own phrase. If I create a second template named slightly differently but using the same code below except changing Twitter to Facebook and the phrase, that block doesn't show on the sidebar.

Code:
<xen:hook name="ad_sidebar_bottom" />

<div class="section myClass">
<div class="secondaryContent">
<h3>{xen:phrase my_block_twitter}</h3>

TWITTER WIDGET CODE HERE