Joel, thanks for all the help. My view already works fine. I get an empty result if there was no project flagged bu the user, but the corresponding menu item is still displayed. I think i&#39;m missing something. I don&#39;t see what you mean by:<div>
<br></div><div>&quot;If there is no project for that user, then the View doesn&#39;t fire, so you create the menu in Empty Text area.  So one menu could be in Global:custom text, and the other in Empty Text.&quot;</div><div>
<br></div><div>Thanks again!</div><div><br></div><div><br></div><div>Toon<br><br><div class="gmail_quote">On Tue, Jun 7, 2011 at 10:12 PM, Joel Willers <span dir="ltr">&lt;<a href="mailto:joel.willers@sigler.com" target="_blank">joel.willers@sigler.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In relationships for Flags, you can have it &#39;Marked by current user&#39;.  Then in Filters you can use that relationship for &#39;Flag: marked XXX&#39;.<br>


<br>
If they haven&#39;t marked it, it won&#39;t show.<br>
<br>
Hope that helps.<br>
<font color="#888888"><br>
Joel<br>
</font><div><div></div><div><br>
<br>
Actually, to make it a bit more complex: there is no user reference field. The project is flagged by a certain user. This is used in the view &quot;my_projects&quot; as a relationship &quot;Flags: student_selected by current user&quot;.<br>


Is there a way to still do what you described below? The only arguments that seem to be available to add are &quot;Flags: Content ID&quot; and &quot;Flags: Flagged time&quot;.<br>
Or do i somehow have to create the user reference when flagging (through Rules)?<br>
<br>
Thank you so much for your help already!<br>
<br>
Best,<br>
<br>
<br>
Toon<br>
On Tue, Jun 7, 2011 at 8:59 PM, Joel Willers &lt;<a href="mailto:joel.willers@sigler.com" target="_blank">joel.willers@sigler.com</a>&gt; wrote:<br>
For your PHP suggestion, you would use global $user and detect the user role, but you wouldn&#39;t be able to easily use this for detecting if they have a project.<br>
<br>
For my suggestion, you can use the content type Project (I don&#39;t know your configuration, so I&#39;m making some general assumptions), and let&#39;s say it has a user reference called field_project_user.  You would set that as an argument, and in the section for what to do if there is no argument, you set a default argument as logged in user.  Then you set a filter for node:type = Project.<br>


<br>
If there is no project for that user, then the View doesn&#39;t fire, so you create the menu in Empty Text area.  So one menu could be in Global:custom text, and the other in Empty Text.<br>
<br>
Similar arguments can be used for many user fields, so play around with them.  If you give me more specifics, I might be able to send you more explanation, but really, that should be enough for you to create it.<br>
<br>
Joel<br>
<br>
<br>
Hey Joel, thank you so much!<br>
I think i could do it if i would be able to load the currently logged in user in the &quot;Show if the following PHP code returns TRUE&quot; box of the menu block. Can i do that? How?<br>
<br>
Alternatively, could you elaborate a bit on your last suggestion please?<br>
<br>
Best,<br>
<br>
Toon<br>
<br>
If it were me, I&#39;d use Views and detect the User based on role and probably use Custom Field module for PHP and do all sorts of tests in there.  Since it&#39;s a block, though, arguments aren&#39;t passed, so you could do a Default argument from PHP and do all sorts of fun PHP code in there, so you wouldn&#39;t need an additional module.<br>


<br>
Or you could assign a role using a Rule, or have the User based on an argument (again, default argument, Current Logged in User), and use Empty Text to show a different menu based on the existence of that project.<br>
<br>
Actually, I kinda like that last idea...<br>
<br>
Joel<br>
<br>
You could make two blocks, put them in the same place and assign visibility settings based on role.  There are many options, though.<br>
<br>
Joel<br>
<br>
Hello all,<br>
<br>
Let&#39;s i want to display or not display a menu item depending on some property of the logged in user. E.g. when my user has selected a project (i.e. a reference to the project can be found through the user) i want to display a menu item &quot;my project&quot;, if not i want to display a different menu item &quot;available projects&quot;. How do i do this? Context? Rules? Menu hooks?<br>


<br>
Any ideas?<br>
<br>
Best,<br>
<br>
<br>
Toon<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
<br>
</div></div>--<br>
<div><div></div><div>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br>
</div>