Skip to main content

is this a case for RULES

1 reply [Last post]
User offline. Last seen 6 weeks 11 hours ago. Offline
Joined: 01/26/2010
Posts:
Points: 0

I am wondering if I need to use rules for an idea I have.  I have installed rules, but it's not as cut and dry as i hoped for.  i hoped for a very person-friendly way of using "if & then" logic.  i.e. if a user logs in, then show something different on the home page.  however i am finding myself in a maze of machine language operators instead of "if,  then display  'content'"

 

if anyone here works with rules, holler back!

0
Your rating: None
User offline. Last seen 1 week 4 days ago. Offline
Joined: 01/24/2010
Posts:
Points: 0
Groups: Developers
Rules is "triggers" not logic

Rules is designed to do things (actions) when other things happen (triggers).

  • When new content is created; email the admin.
  • When user logged in; redirect to profile page.
  • When coupon code applied; change product price.

What you describe is access control which doesn't fit into rules well. Rules can add/remove roles from users but can't turn on/off things on the homepage.

You have a couple of options:

  • Create two blocks that go on the home page. Each one has content for either anonymous or authenticated users. Configure each block to show to either anonymous or authenticated users.
  • Use Block Content Per Role module
    • Oh wait, no D7 version
  • Panels and Context each have options for hiding/showing content based on roles.