Latest news, food, business, travel, sport, Tips and Tricks...

Blogger b:widget-settings and b:widget-setting Tag

The tags <b:widget-settings> (with "s") is a wrapper <b:widget-setting> (without "s") which held user-defined <b:widget> settings known as gadget settings within the Blogger Layout Editor.

The Syntax And Attribute

BLOGGER XML LANGUAGE

<b:widget-settings>

    <b:widget-setting name='EXPLICIT'>

        <!-- setting value -->

    </b:widget-setting>

</b:widget-settings>

  • The tag <b:widget-settings> can only be nested within a tag <b:widget>.
  • The tag <b:widget-settings> only can contain tags <b:widget-setting>.
  • Tags <b:widget-setting> can only be nested within a tag <b:widget-settings>.
  • A tag <b:widget-setting> can only contain gadget settings with an Explicit name.
  • <b:widget-setting> value is HTML Encoded text.

The most used widget is HTML/Javascript type widget. The name widgetsetting is 'content' later on will be described as singleton tag <data:content/>. If we editing its value from the layout editor and inserting HTML code, then the Code will be encoded if we look at Edit HTML editor.

If we want to change the values directly in the HTML Editor it must be a pain to look encoded value. To avoid encoded HTML code, we must marking our code with  <![CDATA[ ]]> Section.

EXAMPLE WITHOUT CDATA SECTION.

<b:widget-settings>

    <b:widget-setting name='content'>

        &lt;div&gt;

            Dont Encode My Div

        &lt;/div&gt;

    </b:widget-setting>

</b:widget-settings>

EXAMPLE WITH CDATA SECTION.

<b:widget-settings>

    <b:widget-setting name='content'>

    <![CDATA[

        <div>

            Dont Encode My Div

        </div>

    ]]>

</b:widget-setting>

</b:widget-settings>

Other Tag

 

,