Available Language Options - 54

What Are These? ... Read more about them, here! ... Do you publish a Non-English blog?

Monday, December 11, 2006

Customising Multiple LinkLists

Each LinkList in your blog will have a unique number. You must replace the default record
<b:widget id='LinkList ... type='LinkList'/>

with the code for that LinkList. For instance
<b:widget id='LinkList3' ... type='LinkList'/>
must be replaced with the correct code for LinkList3.

The Cumulus HiddenLinkList code, as provided, can replace LinkList1 thru LinkList7, without modification. Simply select as appropriate.

If you have a linklist in the blog, other than Linklist1 thru LinkList7, you'll have to download LinkList1, then edit the code, in 9 locations, as shown below. In other words, if you're looking to hide Linklist17, change all 9 instances of 1 to 17.

Note that this code is provided for example only, and is liberally seeded with gratuitous line breaks, to prevent display problems. Always start with proper downloaded code.

To prevent problems, change all 9 "1" identically, to match the existing "<b:widget id='LinkList..." widget.

<b:widget id='LinkList1' locked='false' title='Links' type='LinkList'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
(Select To Hide or Show Linklist)<br/>
<a href='javascript:void' onclick='javascript:hideLinklist1();
' title='Switch to Hidden Linklist'>
<img src='http://photos1.blogger.com/blogger2/
5761/839511333942044/1600/Label%20Hide%20Style.jpg'/></a>
<a href='javascript:void' onclick='javascript:showLinklist1();
' title='Switch to Visible Linklist'>
<img src='http://photos1.blogger.com/blogger2/
5761/839511333942044/1600/Label%20List%20Style.jpg'/></a>
<b><a href='http://cumulusblogs.blogspot.com/2006/12/
cumulus-linklist-how-does-it-work.html'>What Are These Boxes?</a></b>

<div class='widget-content'>
<div id='LinkListDisplay1'>
</div>
</div>

<script language='javascript' type='text/javascript'>

function showLinklist1() {
var display = "<ul>";
<b:loop values='data:links' var='link'>
display = display + "
<li><a expr:href='data:link.target'>
<data:link.name/></a></li>";
</b:loop>
display = display + "</ul>";

obj = document.getElementById('LinkListDisplay1');
obj.innerHTML = display;
}

function hideLinklist1() {
var display = "";

obj = document.getElementById('LinkListDisplay1');
obj.innerHTML = display;
}

// set default to Hidden Linklist
hideLinklist1();
</script>

<b:include name='quickedit'/>
</b:includable>
</b:widget>

No comments: