Closed iangilman closed 6 years ago
For reference, here's how you mix PHP if statements with HTML:
<?php if($condition) : ?>
<a href="http://yahoo.com">This will only display if $condition is true</a>
<?php elseif($anotherCondition) : ?>
more html
<?php else : ?>
even more html
<?php endif; ?>
Though in this case you are already inside a large PHP block, so the beginning and ending PHP tags are already taking care of you. Also you don't need the elseif in this case. So, your new code would end up looking more like:
if($condition) : ?>
<a href="http://yahoo.com">This will only display if $condition is true</a>
<?php else : ?>
even more html
<?php endif;
The dev site bfn.context.org is using a plugin called Restricted Site Access.
Doing our own re-direct sounds like a good step. I see this as part of the bigger picture in #47 since we will eventually want to send:
I support doing whatever you feel is a useful next step in this direction.
Cool. Good to have the context. I think for starters just being able to know whether you're logged in (and present a different UI then) is a good start.
Works for me.
BTW, it appears that this isn't an issue on the production site, since it redirects the user to an entirely different login page. We ran into some trouble related to this on the local site, though, so it seems worth fixing.