Add Page Class Names

AllenAllen Registered Users Posts: 10,013 Major grins
edited August 13, 2013 in SmugMug Feature Requests
Add the class name .loggedIn and .notLoggedIn respectively to every page.

Add a unique class name to every page.
Al - Just a volunteer here having fun
My Website index | My Blog

Comments

  • DJDigitalDaveDJDigitalDave Registered Users Posts: 84 Big grins
    edited August 13, 2013
    Allen wrote: »
    Add the class name .loggedIn and .notLoggedIn respectively to every page.

    Add a unique class name to every page.

    Allen, just to be sure I understand this correctly: Because there is currently no .notLoggedIn class in the new Smugmug, I can't, for example, hide the Get a Link item on the Share Menu from my site viewers but avail myself to it when I'm logged-in?
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited August 13, 2013
    Allen, just to be sure I understand this correctly: Because there is currently no .notLoggedIn class in the new Smugmug, I can't, for example, hide the Get a Link item on the Share Menu from my site viewers but avail myself to it when I'm logged-in?
    Not sure if you can find a specific class that applies to every gallery for that.

    Logged in shows a .sm-user-loggedin class.
    <body class="sm-user-pro sm-user-loggedin sm-user-owner sm-page sm-page-node sm-page-node-zsB4B sm-page-home">

    Not logged in shows no .notLoggedIn class
    <body class="sm-user-pro sm-page sm-page-node sm-page-node-pR2x9 sm-page-home">

    CSS
    whatever {display:none}
    .sm-user-loggedin whatever {display:block}
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • DJDigitalDaveDJDigitalDave Registered Users Posts: 84 Big grins
    edited August 13, 2013
    Allen wrote: »
    Not sure if you can find a specific class that applies to every gallery for that.

    Logged in shows a .sm-user-loggedin class.
    <body class="sm-user-pro sm-user-loggedin sm-user-owner sm-page sm-page-node sm-page-node-zsB4B sm-page-home">

    Not logged in shows no .notLoggedIn class
    <body class="sm-user-pro sm-page sm-page-node sm-page-node-pR2x9 sm-page-home">

    CSS
    whatever {display:none}
    .sm-user-loggedin whatever {display:block}

    Well, this is interesting: .sm-user-loggedin did not work, but .sm-user-owner worked perfectly! It hides the 'Get a Link' Share Menu item when not logged-in and displays it as expected when logged-in.

    This is the CSS that works:

    li#ShareGetALink {display: none;}
    .sm-user-owner li#ShareGetALink {display: block;}

    Thank you so much, Allen! I appreciate all the help you provide to this forum.

    - Dave
Sign In or Register to comment.