不中用 Posted July 19, 2016 Posted July 19, 2016 . @Rikki now cSignedOut & cSignedIn classes are only in the #ipsLayout_header .. it would be more useful if it is also existing in #ipsLayout_body .. For the moment only cSignedOut is used 1 time .. If it was possible to do #ipsLayout_body . cSignedOut in CSS then we could do much more in the front depending if users are logged in or not .. ex. like adjusting store layout for guest only ( price tags ) .. or accentuate more areas all over the site for guests only .. Thanks! .
TSP Posted July 29, 2016 Posted July 29, 2016 I think what you really want is for them to add for example ipsLoggedIn to the body classes. Currently it can look like this: <body class="ipsApp ipsCommunity ipsApp_front ipsJS_has ipsClearfix" ...> But they could have it be this for logged in members: <body class="ipsApp ipsCommunity ipsApp_front ipsLoggedIn ipsJS_has ipsClearfix" ...> I agree. (Or have it be a data-attribute on the body class that is data-loggedIn="true/false" for example)
不中用 Posted July 29, 2016 Author Posted July 29, 2016 . I've used the same class names IPS already coded .. I've adjusted the globalTemplate .. From this .. <main role='main' id='ipsLayout_body' class='ipsLayout_container'> To this .. <main role='main' id='ipsLayout_body' class='ipsLayout_container {{if \IPS\Member::loggedIn()->member_id }}cSignedIn{{else}}cSignedOut{{endif}}'> So everywhere on the site I can use CSS like this .. #ipsLayout_body.cSignOut [[some other value here]] { .. } To distinguish guests from logged in members/clients .. .
TSP Posted July 29, 2016 Posted July 29, 2016 Yes, I realize that. But if they choose to add this idea to the core, then it wouldn't make sense in my opinion to apply such a class to the "limited" scope of ipsLayout_body, when this is a type of information it makes sense to have available in the global scope of the entire document that can be styled with CSS (meaning the body-element) You would then do things like body.loggedIn [[some other value here]] { in the CSS (instead of how you've done it) A class name like "cSignOut" signifies the meaning that it has something to do with an element that lets you sign out, while a class name like isLoggedIn / loggedIn, would better communicate that it represents a certain state that can be applied to the whole page. To clarify; I'm not opposed to the general idea of what you propose, I'm only detailing what I think would be a more sensible implementation of your suggestion.
不中用 Posted July 29, 2016 Author Posted July 29, 2016 3 minutes ago, TSP said: Yes, I realize that. But if they choose to add this idea to the core, then it wouldn't make sense in my opinion to apply such a class to the "limited" scope of ipsLayout_body, when this is a type of information it makes sense to have available in the global scope of the entire document that can be styled with CSS (meaning the body-element) You would then do things like body.loggedIn [[some other value here]] { in the CSS (instead of how you've done it) A class name like "cSignOut" signifies the meaning that it has something to do with an element that lets you sign out, while a class name like isLoggedIn / loggedIn, would better communicate that it represents a certain state that can be applied to the whole page. To clarify; I'm not opposed to the general idea of what you propose, I'm only detailing what I think would be a more sensible implementation of your suggestion. even better .
Recommended Posts
Archived
This topic is now archived and is closed to further replies.