I'm looking to add (what I call, might go by another name) Dynamic Account Links to my website, so when the user is logged out, the link would say "Sign In" and then "Sign Out" when the user is logged in.
I figured I'd put the Register link on the Sign In page.
I'm using Adobe Business Catalyst.
I've found related questions on here but they all seem to relate to Ruby and Magento.
Could anyone shed some light on this matter?
Many thanks.
If you have Liquid Markup enabled, you can serve just the correct html like this:
{% if globals.user.isLoggedIn -%}
...Sign Out link...
{% else -%}
...Sign In link...
{% endif -%}
Without Liquid Markup, you'll need to get CSS involved:
<div class="visible-iff-true--{module_isloggedin}">
...Sign Out link...
</div>
<div class="visible-iff-false--{module_isloggedin}">
...Sign In link...
</div>
.visible-iff-true--0,
.visible-iff-false--1 {
display: none;
}
.visible-iff-true--1,
.visible-iff-false--0 {
display: block;
}