Helpful Information
 
 
Category: vB4 General Discussions
Template Code Help

I have created a new widget but, I want to have the nice little box around the widget... What is the code I need for a new template to have the nice little rounded corner box around my widget?

I tried taking the vbcms_widget_static_page template code a getting rid of some of the stuff in there but, I can't make it work..

Did you try looking at the template vbcms_widget_searchwidget_page ? It is used around the Recent Blog Posts widget and has the rounded corners and nice box.

That is what I meant to say I was using (sorry) but, I can't seem to figure out what to take out so that my advert code (in the widget) will show up in the box. Right now I just get a blank box...

And what is showing up in the page source? Is anything there? Did you configure your widget? I don't really know from what you wrote exactly what you are trying to do and what you have done to accomplish it.

Here is the template I wrote or more or less edited from vbcms_widget_searchwidget_page

<div class="cms_widget">
<div class="block">
<div class="cms_widget_content">


</div>
</div>
</div>

And if you go here http://www.test.bowencollectors.com/forum you can see that the widget on the right hand side has nothing in it...

When I configured the code in the widget it was just a basic script code that loads an ad from another page. Looks similar to the ad on the left hand side of the page...

What 'type' of widget did you create? And exactly what did you enter in the Configure box?

I created a static html widget and used the below code in the configuration...

center is deprecated element;)
http://www.w3.org/TR/REC-html40/present/graphics.html#h-15.1.2

If you replace that code with just "hello", do you see anything? When troubleshooting, it's always best to figure out where you are going wrong and the first thing you want to find out is if it is seeing your input at all.

nope...

not yet... The ad works without the template... though

If you used exactly what you posted in post 5, you aren't going to get anything since you aren't including the output variable anywhere - {vb:raw static_html} Also, if you are making your own template, you can put stuff directly into it where you want it.

I get results on my test site after I put in the variable.

That did it Lynne! Thanks a million!










privacy (GDPR)