Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
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)
}
Attachment | Size |
---|---|
editable-banner.png | 24.79 KB |
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Created by gaurishankar on , updated