Check form admin subsite in dryml tag

21 views
Skip to first unread message

Bob Sleys

unread,
Nov 18, 2011, 10:50:59 AM11/18/11
to hobo...@googlegroups.com
I have a tag I want displayed on all pages of the site except the admin subsite.  Is there some easy way to determine the page is on the admin subsite and exclude the tag?

What I have now is the following in my application.dryml

<extend tag="page">
  <old-page merge>
    <after-header:>
      <if test="&current_user.employee?">
        <project/>
      </if>
    </after-header:>
  </old-page>
</extend>

So I want the project tag to be included in pages where the user is an employee AND they are NOT on the admin subsite.  Note an employee can also be an admin so they might have access to the admin subsite also.

Bob

Bryan Larsen

unread,
Nov 18, 2011, 11:02:10 AM11/18/11
to hobo...@googlegroups.com
Instead of placing that in your application.dryml, put it in
front_site.dryml. front_site.dryml is not included in subsites.

Bryan

> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/py7SrasUlKMJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>

Bob Sleys

unread,
Nov 18, 2011, 11:15:52 AM11/18/11
to hobo...@googlegroups.com
Works perfectly thanks I knew there had to be an easy way of doing this that I was just missing.

Thanks again
Bob
Reply all
Reply to author
Forward
0 new messages