source: sipes/modules_contrib/views/help/embed.html @ 65dadeb

stableversion-3.0
Last change on this file since 65dadeb was 177a560, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio de modulos contribuidos de drupal

  • Propiedad mode establecida a 100644
File size: 1.2 KB
Línea 
1You can easily embed the results of a view into other parts of your site;
2either with code as a module, or in nodes or blocks as snippets. The
3easiest way is to use the function <strong>views_embed_view()</strong>:
4
5<code>/**
6 * Embed a view using a PHP snippet.
7 *
8 * This function is meant to be called from PHP snippets, should one wish to
9 * embed a view in a node or something. It's meant to provide the simplest
10 * solution and doesn't really offer a lot of options, but breaking the function
11 * apart is pretty easy, and this provides a worthwhile guide to doing so.
12 *
13 * @param $name
14 *   The name of the view to embed.
15 * @param $display_id
16 *   The display id to embed. If unsure, use 'default', as it will always be
17 *   valid. But things like 'page' or 'block' should work here.
18 * @param ...
19 *   Any additional parameters will be passed as arguments.
20 */
21function views_embed_view($name, $display_id = 'default') {
22</code>
23
24To figure out the id of a display, hover your mouse over the tab to select that display. Everything after the '#views-tab-' is the id of that display. This ID is guaranteed never to change unless you delete the display and create a new one.
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.