2

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.

0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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