php et js point carte cliquable
This commit is contained in:
@@ -42,7 +42,8 @@ class SitesMap extends BlockBase {
|
||||
$title = $site->get('title')->getString();
|
||||
$subtitle = $site->get('field_sous_titre')->getString();
|
||||
|
||||
$link_options = ['absolute' => FALSE, 'attributes' => ['class' => 'site-link']];
|
||||
$link_options = ['absolute' => TRUE, 'attributes' => ['class' => 'site-link']]; // Passer 'absolute' à TRUE
|
||||
$site_url = $site->toUrl('canonical', $link_options)->toString(); // URL absolue pour le data-url
|
||||
$site_link_object = Link::createFromRoute("voir le site", 'entity.node.canonical', ['node' => $site->id()], $link_options);
|
||||
$link = $site_link_object->toString()->getGeneratedLink();
|
||||
|
||||
@@ -70,7 +71,8 @@ class SitesMap extends BlockBase {
|
||||
|
||||
<circle
|
||||
class="site-link"
|
||||
data-content="$datacontent"
|
||||
data-content="$datacontent"
|
||||
data-url="$site_url"
|
||||
cx="0" cy="0" r="$r"
|
||||
style="fill-opacity:1;fill-rule:nonzero;" />
|
||||
<path
|
||||
|
Reference in New Issue
Block a user