We can render a block in PHP as we discussed previously.
Drupal – Render a Block in PHP Code
This time, we want to render a view display by using the views_embed_view(). Continue reading Drupal – Render a View in PHP Code
We can render a block in PHP as we discussed previously.
Drupal – Render a Block in PHP Code
This time, we want to render a view display by using the views_embed_view(). Continue reading Drupal – Render a View in PHP Code
You can render a block in PHP as follow.
...
$block = (object) module_invoke('<module>', 'block', 'view', "<block id>");
print theme('block', $block);
...
We can use the hook_views_pre_render to insert extra content before or after the view content.
custom.module Continue reading Drupal – Add more content to a specific view using hook_views_pre_render
We have talked about the Views Custom Field module previously. If you have no idea what is it for, you can take a look @ Drupal – Custom PHP code for Views Field.
Sometimes we may need to get a full node using Views Custom Field. For example, i want to get the number of images of a node. Continue reading Drupal – Sharing data across fields in the same row with Views Custom Field
The Views Custom Field module makes Views highly customizable. You create a HTML markup or PHP code snippet as a field which could retrieve and manipulate any data from the database. Continue reading Drupal – Custom PHP code for Views Field
After exposing the filter in views, we can configure it as follow such that it will automatically add an <Any> option in the selection list and display all values when the view is first rendered. Continue reading Drupal – Set Views Exposed Filter to show all values by Default
Sometimes we only want to show part of the node body as an abstract. In this case, we can achieve this by adding a Teaser Break in the node body. A Teaser break is simply a HTML code as follow Continue reading Drupal – Add Teaser Break in Node Body
In Drupal Views module, you could not configure the view title translation in the view settings page. The post shows you how to translate view title with the i18n module. For more information about the i18n module, please refer to
Sometimes we may want to set the page title with url argument. This could be done by adding the following code in the page argument section of view setting. Continue reading Drupal – Set Views Argument as View Title
Assume we have the following taxonomy hierarchy. Continue reading Drupal – Create Views for Parent Terms or Children Terms Only