style-jump.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. With the <strong>jump menu</strong> style can you create selectbox menus for the content of your site.
  2. <a href="path:images/views3-jump-style-menu.png"><img src="path:images/views3-jump-style-menu.png" /></a>
  3. The <strong>jump menu</strong> style will display each row of your view within a jump menu. This style requires that your view's <a href="topic:views/style-row">row style</a> is set to <a href="topic:views/style-fields">fields</a>.
  4. To properly configure a jump menu, you must select one field that will represent the path to utilize. In most cases, you will need to rewrite the output of this field. You should set that field to exclude from display. All other displayed fields will be part of the menu. Please note that all HTML will be stripped from this output as select boxes cannot show HTML.
  5. Some examples of how this might be useful:
  6. <h3>Jump to a node</h3>
  7. <ol>
  8. <li>Create a new <strong>Node</strong> view</li>
  9. <li>Select the <strong>Node: Path</strong> and <strong>Node: Title</strong> fields</li>
  10. <li>Configure the <strong>Node: Path</strong> field to "exclude from display" and check "Use absolute link"</li>
  11. <li>Configure the <strong>Node: Title</strong> field by removing the "Label" and unchecking "Link this field to its node"</li>
  12. <li>Set the view style to <strong>jump menu</strong></li>
  13. <li>In the style settings, set the "Path field" to <strong>Node: Path</strong></li>
  14. </ol>
  15. Your view will now display with a select list and a <strong>Go</strong> button. If you select an item in the list and hit the <strong>Go</strong> button you will see the selected node's page in the browser.
  16. <h3>Jump to a node's edit page</h3>
  17. <ol>
  18. <li>Create a new <strong>Node</strong> view</li>
  19. <li>Select the <strong>Node: Nid</strong> and <strong>Node: Title</strong> fields</li>
  20. <li>Configure the <strong>Node: Nid</strong> field to "exclude from display" and check "Rewrite the output of this field"</li>
  21. <li>In the text field that appears for rewriting the output of this field, enter <strong>node/[nid]/edit</strong></li>
  22. <li>Configure the <strong>Node: Title</strong> field by removing the "Label" and unchecking "Link this field to its node"</li>
  23. <li>Set the view style to <strong>jump menu</strong></li>
  24. <li>In the style settings, set the "Path field" to <strong>Node: Nid</strong></li>
  25. </ol>
  26. Your view will now display with a select list and a <strong>Go</strong> button. If you select an item in the list and hit the <strong>Go</strong> button you will see the selected node's edit page in the browser. Please note that users without rights to the node's edit page will see an access denied message.
  27. <h3>Jump to a user profile</h3>
  28. <ol>
  29. <li>Create a new <strong>User</strong> view</li>
  30. <li>Select the <strong>User: Uid</strong> and <strong>User: Name</strong> fields</li>
  31. <li>Configure the <strong>User: Uid</strong> field to "exclude from display" and check "Rewrite the output of this field"</li>
  32. <li>In the text field that appears for rewriting the output of this field, enter <strong>user/[uid]</strong></li>
  33. <li>Configure the <strong>User: Name</strong> field by removing the "Label" and unchecking "Link this field to its user"</li>
  34. <li>Set the view style to <strong>jump menu</strong></li>
  35. <li>In the style settings, set the "Path field" to <strong>User: Uid</strong></li>
  36. </ol>
  37. Your view will now display with a select list and a <strong>Go</strong> button. If you select an item in the list and hit the <strong>Go</strong> button you will see the selected user's profile page in the browser.