PDA

View Full Version : Template Code Help


ashley76
11-18-2009, 01:41 PM
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..

Lynne
11-18-2009, 02:15 PM
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.

ashley76
11-18-2009, 02:38 PM
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...

Lynne
11-18-2009, 03:37 PM
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.

ashley76
11-18-2009, 04:44 PM
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...

Lynne
11-18-2009, 06:02 PM
What 'type' of widget did you create? And exactly what did you enter in the Configure box?

ashley76
11-18-2009, 06:14 PM
I created a static html widget and used the below code in the configuration...

ragtek
11-18-2009, 06:32 PM
center is deprecated element;)
http://www.w3.org/TR/REC-html40/present/graphics.html#h-15.1.2

Lynne
11-18-2009, 07:05 PM
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.

ashley76
11-18-2009, 07:09 PM
nope...

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

Lynne
11-18-2009, 07:18 PM
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.

ashley76
11-19-2009, 12:16 AM
That did it Lynne! Thanks a million!