This project is not covered by Drupal’s security advisory policy.
This module let's you use an entity view mode as a tooltip. By default it works with fields of type "text".
If you have the Display Suite module installed, you will see a "Title (View mode tooltip)" field as an example.
I want to use it in my module
The module also comes with a theme function you can use. Example :
/**
* @param $element
* the element to use the tooltip on eg. simple text like t('Your text')
*
* @param entity_type
* the entity_type eg. node, user
*
* @param entity
* the entity
*
* @param view_mode
* the view mode eg. full, teaser
*/
theme('view_mode_tooltip', array(
'element' => t('Hover to see the tooltip'),
'entity_type' => 'node',
'entity' => node_load(1),
'view_mode' => 'teaser',
));
I want to customise the tooltip output
Here's the tooltip output HTML :
<div class="view-mode-tooltip">
<div class="tooltip">
<div class="tooltip-content">
<?php print $tooltip; ?>
</div>
<div class="tooltip-arrow-wrap">
<div class="tooltip-arrow"></div>
</div>
</div>
<div class="element">
<?php print $element; ?>
</div>
</div>
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Created by shadcn on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
