Options

Remove or Customize Title from top of gallery?

afarberafarber Registered Users Posts: 267 Major grins
edited June 23, 2016 in SmugMug Customization
Hey all,

I set up my portfolio pages well over a year ago. At the time, I added a Title content block to each one and did not allow the gallery to display its own default title. I did this because I wanted the title text to be smaller and centered and separated from the images by 24px.

Now I see that every gallery has it's default title showing up - so the title now shows twice. Did I miss something simple? How do I get rid of the default title? OR, how do I customize the default title so it shows up the way I want it to?

Bonus points - any way to make this fix in bulk so I don't have to go back through every gallery individually?

See here for an example: http://www.adamfarber.com/Portfolio/Music/Music-Highlights/

Thanks!
Adam

Comments

  • Options
    pilotdavepilotdave Registered Users Posts: 785 Major grins
    edited June 16, 2016
    afarber wrote: »
    Hey all,

    I set up my portfolio pages well over a year ago. At the time, I added a Title content block to each one and did not allow the gallery to display its own default title. I did this because I wanted the title text to be smaller and centered and separated from the images by 24px.

    Now I see that every gallery has it's default title showing up - so the title now shows twice. Did I miss something simple? How do I get rid of the default title? OR, how do I customize the default title so it shows up the way I want it to?

    Bonus points - any way to make this fix in bulk so I don't have to go back through every gallery individually?

    See here for an example: http://www.adamfarber.com/Portfolio/Music/Music-Highlights/

    Thanks!
    Adam

    Add this to your Theme CSS:

    .sm-gallery-cover-title {
    display: none;
    }

    It might also work in a CSS content block for the Entire Site or All Galleries, but if each gallery is individually customized, I'm not sure.

    Dave
  • Options
    afarberafarber Registered Users Posts: 267 Major grins
    edited June 18, 2016
    Thanks. It did not work putting it into my site Theme, but it did as a content block on a single custom gallery. Now, is there any way to do that in bulk for every gallery under one folder (in this case "Portfolio")?

    Thanks!!
  • Options
    denisegoldbergdenisegoldberg Administrators Posts: 14,238 moderator
    edited June 18, 2016
    afarber wrote: »
    Thanks. It did not work putting it into my site Theme, but it did as a content block on a single custom gallery. Now, is there any way to do that in bulk for every gallery under one folder (in this case "Portfolio")?
    I'm not aware of a way to bulk customize galleries to add CSS to each of them.
    Have you tried adding !important to the suggested CSS and placing it in your theme?

    Is the title the only reason you made the galleries custom? Since you seem to need to edit each of them you might consider reverting the galleries back from custom and applying the title customization in your theme. I would remove it from one gallery, add the code to your theme, and make sure it works as desired before reverting all of the galleries. (I'm a big fan of using as little code as possible to meet your needs in order to provide easy maintenance and change.)

    --- Denise
  • Options
    Chasing DaylightChasing Daylight Registered Users Posts: 65 Big grins
    edited June 18, 2016
    To apply to all galleries (except individually customized galleries) you can add the code provided previously, or the code I've listed below, to a CSS content block for All Galleries in Customize > Content and Design (upper right select All Galleries)

    /* Hide the Gallery Title & gallery description */
    .sm-gallery-cover-title {
    display: none !important;
    }

    Putting it in a CSS content block for All Galleries, it will apply to any gallery that hasn't been made individually customized. If you've individually customized any galleries, the CSS will need to be added to each of those galleries individually.
    Kelly | SmugMug Support Specialist
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited June 19, 2016
    afarber wrote: »
    Thanks. It did not work putting it into my site Theme, but it did as a content block on a single custom gallery. Now, is there any way to do that in bulk for every gallery under one folder (in this case "Portfolio")?

    Thanks!!
    Using the parentnode CSS for the Portfolio folder it will apply to every child of the folder.

    .sm-page-parentnode-T33q9 .sm-gallery-cover-title {
    display: none !important;
    }
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    afarberafarber Registered Users Posts: 267 Major grins
    edited June 22, 2016
    Thanks, everyone! Allen - that worked perfectly. It even worked in my customized galleries. Phew! A lot of work saved.

    Question - how did you locate the parentnode?

    I'm still hoping to pull my Portfolio galleries back from being individually customized, but I asked about that in another thread I just posted.

    Really appreciate all the help!

    Adam
  • Options
    Hikin' MikeHikin' Mike Registered Users Posts: 5,453 Major grins
    edited June 22, 2016
    afarber wrote: »

    Question - how did you locate the parentnode?

    Using one of the web tools. I use Firebug for Firefox.
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited June 23, 2016
    afarber wrote: »
    Thanks, everyone! Allen - that worked perfectly. It even worked in my customized galleries. Phew! A lot of work saved.

    Question - how did you locate the parentnode?

    I'm still hoping to pull my Portfolio galleries back from being individually customized, but I asked about that in another thread I just posted.

    Really appreciate all the help!

    Adam
    Go to the parent folder for these galleries. For this case the Portfolio folder (http://www.adamfarber.com/Portfolio).
    Look at the page source. Do a search/find (cntl+f) for <body ...
    (Edit: for Firefox and Chrome you can use Inspect Element from the browser tools or mouse right click menu)

    <body class="sm-user-professional sm-user-loggedin sm-page sm-page-node sm-page-node-T33q9 sm-page-parentnode-JTVMM">

    In the body tag, the unique class name for this Portfolio folder page is sm-page-node-T33q9.

    The body tag will also carry ALL its parents parentnode class names.

    Every child of this folder will have a parentnode class name of this folder. .sm-page-parentnode-T33q9

    Notice the parentnode has the same ending code as the parent.
    BTW, sm-page-parentnode-JTVMM is the parent of this folder, your homepage.

    Here's what two layers down look like. Notice how each level has all the parentnodes up to your
    homepage. So by using the parentnode in the CSS you can apply to flow down from any level.
    /Portfolio/Music
    <body style="" class="sm-user-professional sm-user-loggedin sm-page sm-page-node
       sm-page-node-7Qz8z sm-page-[COLOR=Yellow]parentnode[/COLOR]-JTVMM sm-page-[COLOR=Yellow]parentnode[/COLOR]-T33q9
       sm-page-initialized">
    /Portfolio/Music/Music-Highlights
    <body style="" class="sm-user-professional sm-user-loggedin sm-page sm-page-node
       sm-page-node-VnNdK sm-page-[COLOR=Yellow]parentnode[/COLOR]-JTVMM sm-page-[COLOR=Yellow]parentnode[/COLOR]-T33q9
       sm-page-[COLOR=Yellow]parentnode[/COLOR]-7Qz8z sm-page-gallery sm-page-gallery-album sm-page-initialized">
    
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    afarberafarber Registered Users Posts: 267 Major grins
    edited June 23, 2016
    Thanks for the very thorough explanation!!
Sign In or Register to comment.