Friday, April 30, 2010

Static Pages, And A Custom Pages Index - Part 2

There are always details to deal with, and the "Linklist as Pages Index" solution, to provide a "Pages" gadget that indexes non pages, is no exception. As pointed out to me this morning, a "LinkList" gadget, when simply substituted for the "PageList" gadget, doesn't have the right stuff to make the selected tab light up, when the requested page is being displayed. The lit up tab makes the Tabs gadget seem so user friendly, and some folks like that little detail.

Fortunately, this is not difficult to correct.
  1. First (yes, he's telling us again), backup your template.
  2. Next, "Edit HTML" and select "Expand Widget Templates".
  3. Look for
    <b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
  4. Look a few lines below that for
            <li><a expr:href='data:link.target'><data:link.name/></a></li>
    
    and replace it with
            <b:if cond="data:blog.url == data:link.target">
              <li class='selected'><a expr:href='data:link.target'><data:link.name/></a></li>
            <b:else/>
              <li><a expr:href='data:link.target'><data:link.name/></a></li>
            </b:if>
    
  5. Save Template.
  6. Test.
  7. And finally, backup your template,again.
Not terribly complicated. Just another detail.

>> Top

5 comments:

Adam said...

Wow! That's pretty quick turnaround, Chuck. Thanks.

I am now going to have to think about moving my blog to the new templates, just so I can do this.

Roberto said...

... and it works, too!
Great effort, Chuck.

Susan Walker Art said...

This was great...took me a while but i got most of it. though my tabs are in a list not across the top pf the page

Chuck said...

Susan,

Either you located your linklist in the wrong template section, or your template doesn't have the right section. The Tabs section contains the horizontal propagation attributes.

Jennifer said...

Thank you! I now have fabulous tabs that light up.