Access Drupal views argument in the same views header or footer section.
In drupal views module, is there any way to 开发者_C百科access the arguments in the header or footer section?
What i need to do is show a more/[arguement-1] link in the footer section of the view. I've changed the input format to php and I'm stuck as to how to access the views variable.
Well, if he's using the Views Attach module, the arguments may not necessarily be available in the URL.
However, there is a method for doing this within the Views API. Below I need to access the first argument sent to the View so as to draw information out of the specified node:
$view = views_get_current_view();
$nid = $view->args[0];
$node = node_load($nid);
If they are URL arguments can't you just use the arg() function?
精彩评论