Welcome Guest, Not a member yet? Register   Sign In
how to show parts of my view, if user does have access?
#2

[eluser]Clifford James[/eluser]
Something like this?

Code:
<ul>
  &lt;!-- this should be available to every user --&gt;
  <li>
      <a href="&lt;?= site_url('presentation/add') ?&gt;">neue Präsentation</a>
  </li>
  &lt;!-- this item should just be available to certain users with certain roles --&gt;
  &lt;? if (requireUserRole($user->role)) : ?&gt;
  <li>
      <a href="&lt;?= site_url('presentation/list_all') ?&gt;">alle Präsentationen</a>
      <a href="&lt;?= site_url('presentation/list_all/xml') ?&gt;">xml</a>
  </li>
  &lt;? endif ?&gt;
</ul>


Messages In This Thread
how to show parts of my view, if user does have access? - by El Forum - 08-16-2010, 04:49 AM
how to show parts of my view, if user does have access? - by El Forum - 08-16-2010, 05:54 AM
how to show parts of my view, if user does have access? - by El Forum - 08-16-2010, 05:58 AM
how to show parts of my view, if user does have access? - by El Forum - 08-16-2010, 06:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB