xmltemplatesbloggerblogspot

What is the function of visible=true inside Blogspot widget?


Why <b:widget visible='true'> value in Blogspot always 'true'? I changed it to 'false' then it's back again to 'true' when I reload the edit HTML page. Beside I didn't know the function of it in the Blogspot template.


Solution

  • Update

    With the new update to the Blogger Templates (Refer to this) the visible attribute is now functional and can be used to show and hide the gadgets. This setting can be directly changed in the template or via the Customize > Gadgets interface


    There is no official documentation available for the uses of visible attribute on the b:widget tag.

    As per one of the threads by a Google Employee on the Blogger official forum -

    A workaround for this problem is to head to: Template => Edit HTML => Jump to widget => (The missing widget)

    You'll see visible='false' on the widget. Change this to true, and save the template.

    Please let users know this workaround, and advise them to refrain from modifying their widgets until the problem has been resolved.

    As mentioned in that thread, this attribute was likely used for hiding/showing widgets (The linked thread addresses an issue which happened in June 2016 where multiple users faced problems with widgets abruptly disappearing from their blog.)

    As it currently stands, this widget attribute is not modifiable from the user's end and always remains true

    Blogger does provide another widget attribute for selectively showing widgets on the blog called pageType (with the options all, archive, main or item. Refer to Page elements tags for layouts) but that also is not functional currently (This attribute gets forcefully removed from the b:widget tag when the template is saved)