Oct 1, 2008

Adding Widgets and Gadgets to the "Main" area

After I learned how to add gadgets & widgets to your header I started to wonder if it was possible to apply the same modification to the "main" area of our blogs. I Googled around and from my readings I figured it was possible to do.

If you performed the modification I linked to above this one should be easy to do. Here is the bit of code in the template we are looking for:

<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>

As you can see it is very similar to the div that controls the header that we modified to allow us to add many new elements to the header area. The only difference is that it doesn't have maxwidgets='5' but we can add that in then change showaddelements='yes' and locked='false' and you'll be able to add widgtes and gadgets above and below the main post area. This is what it looks like after the modifications.

<div id='main-wrapper'>
<b:section class='main' id='main' maxwidgets='5' showaddelement='yes'>
<b:widget id='Blog1' locked='false' title='Blog Posts' type='Blog'/>
</b:section>
</div>


I added maxwidgets='5' (since the maxwidgets was not there) and changed no to yes and true to false. Once you've added and changed the necessary bits hit "Preview" and if you did it correctly you'll see a preview of your blog. You won't be able to see any changes but a positive preview lets you know you didn't make a mistake. Click "Save" and you're done. You can then click the link above labeled "Page Elements" to see the change you just made.

In the screenshot above I added a Video Bar gadget above and a Picture gadget below the blog post. Once you've made this modification you can add whatever you want above or below your blog posts and it will show up on every posts whenever people visit your blog. This would be a good place for ads or for a custom message for your blog or a list of links of popular posts on your garden blog.

2 comments:

  1. Beautiful and concise, thanks for making my blog easier to configure!

    ReplyDelete
  2. That's completely awesome! The possibilities seem to become endless with your VERY easy to understand explanations. Thank you!!

    ReplyDelete

I hope you find this blog a useful garden blogging resource. Sometimes I may reply to comments with my MrBrownThumb account or I may reply with my Garden Bloggers account. Hope this isn't confusing. If you're looking for gardening information check out "Google For Gardeners"

Note: Only a member of this blog may post a comment.