I'm using Organic Groups and I'm giving users a link to create content for the current group. I do this by giving the path node/add/grouptype?gids_node[]=1891.

This works fine, as the group is set by default. However, I can't get this to work on the overlay: node/1962#overlay=node/add/grouptype?gids_node[]=1961 makes the overlay not appear at all and node/1961?gids_node[]=1961#overlay=node/add/grouptype shows the overlay, but I don't think the argument is passed correctly.

Do you have any idea? I can't find any documentation on this.

1 Answer 1


Okay, turns out it had nothing to do with overlay and had to do with correctly using l() function. If you want to add a query/arguments to a link using l function, you need to give a query argument to it. For example:

print l("Add page", "node/add/grouptype", array('query' => array('gids_node[]' => $group->etid)));

Otherwise, the ? will be encoded to %3F

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.