Jump to:

23479 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How To Use SilverStripe For Company Intranet ??

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1550 Views
  • AJIT
    Avatar
    Community Member
    4 Posts

    How To Use SilverStripe For Company Intranet ?? Link to this post

    We have selected SilverStripe For Our Company Employee Intranet
    We want that the site has to be secured and therefore I have added following in Page Class after studying security documents on web

    parent::init();
           if($this->URLSegment != 'Security' && !Permission::check("VIEW_SITE"))
    Security::permissionFailure(null);

    This code works but there is no logout link on page

    How to get log out link on page (just like admin user) for all logged in users ?

    Regards ,

    AJIT

  • AJIT
    Avatar
    Community Member
    4 Posts

    Re: How To Use SilverStripe For Company Intranet ?? Link to this post

    We are implimenting version 2.4.2 RC2

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: How To Use SilverStripe For Company Intranet ?? Link to this post

    How to get log out link on page (just like admin user) for all logged in users ?

    <% if CurrentMember %>
    <a href="Security/logout">Log out</a>
    <% end_if %>

    That code basically says If logged in, add a link tag to logout. (Security/logout is the logout handler).

  • AJIT
    Avatar
    Community Member
    4 Posts

    Re: How To Use SilverStripe For Company Intranet ?? Link to this post

    I have done this but how to make following line work in footer template ?

        <% _t('LOGGEDINAS','Logged in as') %> <strong><% if FirstName && Surname %>$FirstName $Surname<% else_if FirstName %>$FirstName<% else %>$Email<% end_if %></strong>

    How to make Firstname & Lastname available when any user logs in ?

    Regards

    AJIT

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: How To Use SilverStripe For Company Intranet ?? Link to this post

    Well if they are logged in then you have the $CurrentMember Object. So you can call any member functions on like like $CurrentMember.FirstName $CurrentMember.Email or just wrap your code in a <% control CurrentMember %>

    1550 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.