source: sipei/modules/views/help/embed.html @ ffa4103

drupal-6.x
Last change on this file since ffa4103 was ffa4103, checked in by Luis Peña <lpena@…>, 12 años ago

Cambiando el nombre de modulos a modules

  • Propiedad mode establecida a 100755
File size: 1.2 KB
Línea 
1<!-- $Id: embed.html,v 1.1 2008/06/13 00:56:19 merlinofchaos Exp $ -->
2You can easily embed the results of a view into other parts of your site;
3either with code as a module, or in nodes or blocks as snippets. The
4easiest way is to use the function <strong>views_embed_view()</strong>:
5
6<code>/**
7 * Embed a view using a PHP snippet.
8 *
9 * This function is meant to be called from PHP snippets, should one wish to
10 * embed a view in a node or something. It's meant to provide the simplest
11 * solution and doesn't really offer a lot of options, but breaking the function
12 * apart is pretty easy, and this provides a worthwhile guide to doing so.
13 *
14 * @param $name
15 *   The name of the view to embed.
16 * @param $display_id
17 *   The display id to embed. If unsure, use 'default', as it will always be
18 *   valid. But things like 'page' or 'block' should work here.
19 * @param ...
20 *   Any additional parameters will be passed as arguments.
21 */
22function views_embed_view($name, $display_id = 'default') {
23</code>
24
25To 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.