Hi,

I'm trying to write a bit of php to grab the title associated with a subqueue (nodequeue module). On the view page of the subqueue, I'm trying to add a link to another display page I've made which uses the content created by that subqueue but formats it differently. The path to my display page is portfolios/title_of_subqueue
I can't figure out what the proper php syntax is to put into a block for the link.

Any advice would be appreciated.
Thanks.

Comments

WorldFallz’s picture

It's a pretty difficult to help without see the code, lol.

jaron’s picture

Well this is part of my problem. It says in the documentation: You'll need the Queue ID, which is easily extracted from the URL on the queue administration page.
I can't figure out how to extract the Queue ID from the URL first off. There are two variables in the URL and I'm not sure which one is the Queue ID (example: admin/content/nodequeue/#/view/#
Secondly, when I try to build a php snippet to put that into a link, I get nothing back. This is what I've been trying:

print nodequeue_title($subqueue_id);

I know the php block is working as I've tested it with Hello World. But I can't get any variables to work.

Thanks.

WorldFallz’s picture

You can get the arguments from the url using the arg function. I've no clue which is the correct one, so you'll have to try both and see which one works.

As for the variables, in general, blocks don't have knowledge of page or node variables-- you can do print_r(get_defined_vars()); to see what's available in that context.