Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
In Drupal, a self-contained collection of content and functionality that is displayed in theme regions is called block.
0
votes
2
answers
788
views
Can we call a custom block inside our hook_block_view()?
I have a module of type block.Now based on the user i want to display different blocks . … php
/**
* Implements hook_block_info().
*/
function sample_module_block_info() {
$blocks['current_posts'] = array(
'info' => t('Current Users Of the Drupal Website'), //The name that will appear …
0
votes
Can we call a custom block inside our hook_block_view()?
.
*/
function sample_module_block_info() {
$blocks['current_posts'] = array(
'info' => t('Current Users Of the Drupal Website'), //The name that will appear in the block list. … 'cache' => DRUPAL_CACHE_PER_ROLE, //Default
);
return $blocks;
}
function sample_module_block_view($delta = '')
{
$block = array();
global $user;
switch ($delta) {
case 'current_posts': …