Editable banner for every path/url
Categories
Component ID
1616378
Component name
Editable banner for every path/url
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
D7
// --- Add image filed in side content type to show image banner for every path--
//----- Add Computed field and write code inside input field -----
$abc = drupal_get_destination();
$entity_field[0]['value'] = $abc['destination'];
//--- This is in output field of computed field----
$display_output = $entity_field_item['value'];
// --- Create a view block
// --- Add 'image field' in views field to show for particular path
// --- Add 'node edit' field for edit added image
//--- Views argument (return php value) return current url path ----
return $_GET['q'];
//--Write code inside view empty text for default image if image is not added for particular path---
(img src="")
$abc = drupal_get_destination();
if( user_access('create',$account = NULL) ) {
(anchor tag start) href="/node/add/(content type name)?destination=(php tag start)print $abc['destination']; (php tag end)">Add Image(anchor tag end)
}