Hi Wolfie,

I was wondering if there is a way to make a view listing content and within the view flag content?

Basically I want to to list content in a views page and without leaving the page flag content.

Comments

awolfey’s picture

You can try theme_flag_lists_list() for now. Read the code to see how to use it.

awolfey’s picture

Status: Active » Fixed

To clarify, you probably want to add this code either in a views custom field or in a views theme tpl or function. You will need to get the node nid and type in your view, probably by adding them as fields and excluding from display.

Either print this or add it to whatever output is being returned.

$node will need to be an object containing the nid and type.

theme_flag_lists_list($node, FALSE, FALSE, FALSE);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ju.ri’s picture

Status: Closed (fixed) » Active

Hi,
sorry to reopen this...
I am trying to print the flag links in a (nodes) view like this within a views custom field:

$flaglinks = theme_flag_lists_list($data, FALSE, FALSE, FALSE);
print $flaglinks;

The result is empty.

But when I put this:

$flaglinks = theme_flag_lists_list($data, FALSE, FALSE, TRUE);
print $flaglinks;

it prints all the flag links just fine, including the ones from flag_lists, so the $data should be fine..
Any ideas? I need to print the links from flag_lists only.

Many thanks in advance

sl27257’s picture

Issue summary: View changes
Status: Active » Closed (outdated)