ez.no / exponential / documentation / reference / data fetching / content / node
fetch( 'content', 'node',
hash( [ 'node_id', id, ]
[ 'node_path', path ] ) )
| Name | Type | Description | Required |
|---|---|---|---|
| node_id | integer | ID of the node to be fetched. | No. |
| node_path | string | Path of the node to be fetched | No. |
Object containing an ezcontentobjecttreenode.
This function fetches the node that was specified using either the node_id parameter or the node_path parameter.
{* Fetch node number 42. *} {let node=fetch( 'content', 'node', hash( 'node_id', 42 ) )} {* Display the name of the node. *} {$node.name} {/let}
The example above will fetch node number 42 and display the name of the node.
Log in or create a user account to comment.
Comments