I am planning to use Quick tabs, and it has one neat feature to use a menu as a callback and it prints the content returned from it. But How can I use the callback to pass NID so that I can return content related to that node.


Basic Page : node/1 callback : tabs_content

Tab 1 | Tab 2 | Tab 3

function tabs_content(){
  $nid = arg(1);
  // Fetch some content related to this node
  return $content;

But obviously arg(1) will not have nid as this function is called from quick tabs arg(1) will be some ajax call back. So how can I get node id ? I dont want to use sessions, want to keep it clean and simple.


Your Answer

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

Browse other questions tagged or ask your own question.