Make sub-categories look like other galleries

NimaiNimai Registered Users Posts: 564 Major grins
edited April 18, 2009 in SmugMug Support
I have a category that has both galleries and sub-categories in it. The Sub-Categories appear first on the category page, in their own box. Then the Galleries are in a box below.
Is there any way to have the sub-categories and galleries all be together in the same box?

Comments

  • PBolchoverPBolchover Registered Users Posts: 909 Major grins
    edited April 18, 2009
    Not easily, no.

    If you're a Power User or Pro, then you can fake it by hiding your sub-categories, and creating a gallery redirect with the same name as the sub-category.
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 18, 2009
    Read post #163 in this thread. It contains javascript code that will merge your sub-categories and galleries into one box so they are not separate.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • NimaiNimai Registered Users Posts: 564 Major grins
    edited April 18, 2009
    Hah! Drat~
    If I'd only looked back here an hour ago, I wouldn't have had to write this:
    //
    // Move sub-categories to the top of the galleries box, and hide the sub-cat box
    //
    var gal = document.evaluate('//div[@id="galleriesBox"]/div[@class="boxBottom"]/div[@class="miniBox"]',document,null,6,null);
    if( gal.snapshotLength > 0 )
    {
      gal = gal.snapshotItem(0);
      var subcat = document.evaluate('//div[@id="subcategoriesBox"]/div[@class="boxBottom"]/div[@class="miniBox"]',document,null,6,null);
      for( var i = 0; div = subcat.snapshotItem(i); ++i )
      {
        gal.parentNode.insertBefore(div,gal);
      }
      document.getElementById('subcategoriesBox').style.display = 'none';
    }
    
    I bet the other post's solution is more elegant, anyway... going to take a look!
    Thanks!
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 18, 2009
    Nimai wrote:
    Hah! Drat~
    If I'd only looked back here an hour ago, I wouldn't have had to write this:
    //
    // Move sub-categories to the top of the galleries box, and hide the sub-cat box
    //
    var gal = document.evaluate('//div[@id="galleriesBox"]/div[@class="boxBottom"]/div[@class="miniBox"]',document,null,6,null);
    if( gal.snapshotLength > 0 )
    {
      gal = gal.snapshotItem(0);
      var subcat = document.evaluate('//div[@id="subcategoriesBox"]/div[@class="boxBottom"]/div[@class="miniBox"]',document,null,6,null);
      for( var i = 0; div = subcat.snapshotItem(i); ++i )
      {
        gal.parentNode.insertBefore(div,gal);
      }
      document.getElementById('subcategoriesBox').style.display = 'none';
    }
    
    I bet the other post's solution is more elegant, anyway... going to take a look!
    Thanks!
    Is "document.evaluate" going to work in deployed versions of IE?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • NimaiNimai Registered Users Posts: 564 Major grins
    edited April 18, 2009
    um... just tried ie7.

    No worky. :cry

    Well, back to your helpful post, then.
Sign In or Register to comment.