Now all modules are in core modules folder
This commit is contained in:
parent
5ba1cdfa0b
commit
05b6a91b0c
1907 changed files with 0 additions and 0 deletions
24
modules/views/help/embed.html
Normal file
24
modules/views/help/embed.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
You can easily embed the results of a view into other parts of your site;
|
||||
either with code as a module, or in nodes or blocks as snippets. The
|
||||
easiest way is to use the function <strong>views_embed_view()</strong>:
|
||||
|
||||
<code>/**
|
||||
* Embed a view using a PHP snippet.
|
||||
*
|
||||
* This function is meant to be called from PHP snippets, should one wish to
|
||||
* embed a view in a node or something. It's meant to provide the simplest
|
||||
* solution and doesn't really offer a lot of options, but breaking the function
|
||||
* apart is pretty easy, and this provides a worthwhile guide to doing so.
|
||||
*
|
||||
* @param $name
|
||||
* The name of the view to embed.
|
||||
* @param $display_id
|
||||
* The display id to embed. If unsure, use 'default', as it will always be
|
||||
* valid. But things like 'page' or 'block' should work here.
|
||||
* @param ...
|
||||
* Any additional parameters will be passed as arguments.
|
||||
*/
|
||||
function views_embed_view($name, $display_id = 'default') {
|
||||
</code>
|
||||
|
||||
To 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.
|
Reference in a new issue