Best way to add edit + flag links to a node being displayed inside Colorbox Node? One of my content types opens in a colorbox node but I need an edit link and flags to appear for certain roles. I'm not using panels for this content type and I'm not using Display Suite either.

Blocks don't get displayed in a colorbox node so I'm wondering what's the easiest and most efficient way to add these links.

Php filter is fine to use.

Thanks
You could use Views, create a block view.

Under advanced, add relationship of flags of the node and check mark require relationship. 

Add flag link and edit link as fields. 

Add Contextual filter of nid and select provide default value, then select get ID value from url. (preview will go blank, which is normal here)

Place view block on your node.




  Php filter is fine to use.


This is very risky, see: What are the downsides of using PHP Filter code in blocks, nodes, views-args, etc?, if you want to use php, create a template file for your node, block, or view. 

Therefore, another option is to create a template file for your content type. 

node--[type-name].tpl.php and do php code there. 

Ex: node--article.tpl.php

In your template file put

&lt;div class="myedit"&gt;
  &lt;?php print '&lt;a href="/node/' . $node-&gt;nid . '/edit"&gt; edit &lt;/a&gt;'; ?&gt;
&lt;/div&gt; 

&lt;div class="myflag"&gt;
  &lt;?php print flag_create_link('FLAGNAME', $node-&gt;nid); ?&gt;
&lt;/div&gt;

&lt;?php print render($content['title']); ?&gt;
&lt;?php print render($content['body']); ?&gt;
&lt;?php print render($content['field_name']); ?&gt;


and so on, you print all the fields you have. 

Remember to flush/clear the cache to see changes.