Hi!
Sorry if this is a silly question, but I would need to show the block "my groups" created using views in this way, so people can "jump" to it.
Can I do this with this module? I haven´t installed it yet, but after reading all specifications carefully it seems that it does not do this.
Thanks for your answer!!
Rosamunda

Comments

marcp’s picture

I'm not sure I fully understand the question, but if you want to display a jump menu containing the result of a view, with the text being node titles, this should work, or should be close to working depending on the latest Views API:

<?php
  $view = views_get_view('your-view-name');
  $view->preview();
  foreach ($view->result as $node) {
    $options['node/' . $node->nid] = $node->node_title;
  }

  print jump_quickly($options);
?>

This assumes that one of the fields in your view is the node title. I tested the code above in a block and it appeared to work just fine.

Rosamunda’s picture

Status: Active » Fixed

Thanks for your answer Marc!! In fact, it´s just what I needed!!!
I´m setting this to fixed and will reopen it in case i have some trouble, but you understood exactly what I needed :) Thanks!
Rosamunda

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fakechilly’s picture

Hi
I am a newbie, and have been working on drupal for 2 weeks. I am facing the same problem. I want to display views results as jump menus... I don't really know what to do with the php snippet given here... Any help will be highly appreciated...

Thanks

fakechilly’s picture

Got it.... thanks... should've read the documentations first....duhh

sej123’s picture

hi

I have used the php code given in #1 and it successfully gives me the drop-down for all my node-titles.
Is there any way when selecting the title from the drop-down, it should display the fields (of the selected node-title) as specified in the view rather than redirecting to the node?

Any help will be highly appreciated...

thanks.

sej123’s picture

Please help!