I want a different style (background-image) for login / logout in the
.authorization-link - there seems to be no class-difference whether I am logged in or logged out.
How do I target the login-state in my LESS theme?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Why not use method
$block->isLoggedIn() to set a custom class for logged in/logged out state.
<?php $loggedInState = $block->isLoggedIn()? 'authorization-logged-in': 'authorization-logged-out'; ?> <li class="authorization-link <?php echo $loggedInState; ?>" data-label="<?php echo $block->escapeHtml(__('or')); ?>">