This is how to do this, choose PHP for block visibility mode and add the code below,
choose in types, array your content type
This is how to do this, choose PHP for block visibility mode and add the code below,
choose in types, array your content type
When you have a problem with google map when hiding or collapsing it within a block you need to do something to fix this. A way to do this is to make gmap block absolute in position and -10000 px in left like
#block-gmap_location-0{
position: absolute;
left: -10000px;
}
and then use jquery to show it with js script
You want simple google map without some extra modules, API keys etc? This is rather simple, all you need is to go to google maps, choose your location and go to upper right corner where is "Paste HTML to embed in website" code, copy that code. Go to Block sections in your drupal administration, create new block and place that code in block.
You are looping through some arrays and you have some image variable, path of original image. You want to print out some variation of that image, this is what you do
You constructed a view and want to get view results and fine tune some usage of them by PHP this is how you get them
$view = views_get_view_result('Name_of_View'); print_r($view);
You will get classic array of values where you can choose which one you want to use and print out. You can also add name of display you want to use.
Every now and then i need to make some custom output of a block, either in some page.tpl.php file or in a drupal interface custom block, either way you can get it with module_invoke function
Form Block module enables you to create nodes from block, so you can have some text and under it block for entering data for node type lets use "tips".
So in previous post with made drupal custom block now lets make custom block with flash banner where data to banner is passed from node that has CCK fields.Make content type with 4 cck text fields, or just use one field, even body can do and then you can manauly manipulate string with PHP, just have some separator in your input.
Sometimes you want to customize block more then its available through drupal admin, then you start themeing. Quickest way is to copy default block.tpl.php file and then edit its name to something you want to customize. Lets say we customize block number 4, which is block created with views, then you make your file name like "block-block-4.tpl.php" and then change its content.