2

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?

2

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')); ?>">
  • I was thinking they did this already for me :-) Thanks! – Alex Sep 5 '16 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.