This article lets you know how to add link to the widget title of HTML/Javascript gadget. The article is split into two,
How to add link to this title?
See related posts:
- Creating a HTML gadget.
- Adding link to HTML gadget.
- Go to Dashboard > Layouts
- Click on + Add a gadget
- In the appearing window, scroll down and add HTML/JavaScript gadget.
- Title it as newgadget, for easy identification.
How to add link to this title?
- Go to Dashboard > Themes > Click on dropdown near Customize & then Edit HTML.
- Click on the template code box, press Ctrl + F and find newgadget
- The code around it will look like,
<b:widget id='HTML6' locked='false' title='newgadget' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2></b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget> - Find <h2 class='title'><data:title/></h2>
- Here, wrap <data:title/> with anchor tags like this. <h2 class="title"><a href="link"><data:title/></a></h2>
- Save Template.
Comments
Post a Comment