ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Slight Problem With Expandable Lists In The Sidebar

July 11, 2007 8:48am

Subscribe [2]
  • #1 / Jul 11, 2007 8:48am

    ShelaghG

    51 posts

    This isn’t a major problem but it’s really bugging me!  I’m putting together a new theme for my blog and have everything just about how I want it.  I’ve used javascript in the sidebar to create expandable lists for my Blogroll, Categories, Monthly Archives and Syndicate links.  The scripts works fine, it expands/contrcats when clicked however when I load the page the EE generated lists are expanded (the Syndicate links are not).  I would like the page to load with all the lists contracted and having used the scripts many times in the past this is how it’s always worked.  This is the first time I’ve used it with a dynamically created page though.  Is there a way around this?  You can see the test page at http://www.tripewriting.net/index.php/site/test_index/

    Thanks

  • #2 / Jul 11, 2007 9:00am

    silenz

    1651 posts

    The opening <ul>-Tags are lacking the style=“display: none;” me thinks ...

  • #3 / Jul 11, 2007 9:10am

    ShelaghG

    51 posts

    Ah, I’d taken that out as I thought it related to whether bullets were displayed or not.  My only problem now is how to do that with the categories as you don’t get to specify the <ul> tag.  This is the code I have in the template :

    <div class="sidetitle"><a  class="showhide" href="/#links?links=reveal"  showhide('categories')" title="Click to show/hide this category">Categories</a></div>
    {exp:weblog:categories weblog="{my_weblog}" style="nested" class="linklist" id="categories"}
    <a href="http://{path={my_template_group}/index}">{category_name}</a>
    {/exp:weblog:categories}

    This is what I have in my style sheet :

    ul.linklist li {
        padding-left: 0px; margin-left: 0px; list-style-type: none
    }

    Can I addit to the style sheet somehow?  As it stands now all the expandable lists load up contracted except the Categories, which looks really odd.

  • #4 / Jul 11, 2007 9:19am

    silenz

    1651 posts

    If you don’t use subcategories the easiest approach would be to use style=“linear” in the weblog:categories-tag. That allows you to hardcode the list.

    Like this:

    
    									
  • #5 / Jul 11, 2007 9:22am

    ShelaghG

    51 posts

    Excellent, I don’t use sub-categories on this blog 😊  It all looks just as I wanted now.

    Thank you very much for your help.

  • #6 / Jul 11, 2007 9:33am

    silenz

    1651 posts

    You’re welcome.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases