title | _template | _fieldset |
---|---|---|
Top Secret |
top-secret |
page |
No one can see this unless they log in.
{{ member:login return="top-secret" }} | |
<div> | |
<input type="text" name="username" id="username" placeholder="Username" > | |
</div> | |
<div> | |
<input type="password" name="password" id="password" placeholder="Password" > | |
</div> | |
<div> | |
<input type="submit" value="Log in"> | |
</div> | |
</div> | |
{{ /member:login }} | |
<!-- Log in form --> |
<a href="{{ member:logout return="/" }}">Logout</a> | |
<!-- Log out link --> |
{{ if logged_in }} | |
<section role="main"> | |
<h2>{{ title }}</h2> | |
{{ content }} | |
</section><!-- END role="main" --> | |
{{ else }} | |
<p>You need to log in to see this.</p> | |
{{ endif }} | |
<!-- This is the template which will display the content using a conditional only if you are looged in --> |
For more information I have written a short article here.