if (!$this->rightClone) {
zoomLink::generateImage($attributes, $this->compiler, 'layerlink', 'layer');
}
- return 'background-image:url(../links/layer_' . $attributes['id'] . '.jpg);background-size:100% 100%;background-repeat:no-repeat;';
+ return 'background-image:url(' . $this->getImageUrl() . ');background-size:100% 100%;background-repeat:no-repeat;';
+ }
+
+ public function getImageUrl()
+ {
+ return '../links/layer_' . $this->uid . '.jpg';
}
public function getZoomAttributes()
class imageLink extends contentLink
{
+ public function getImageUrl()
+ {
+ return wsHTML5Link::getUniversalLocation($this->to, true);
+ }
+
public function getCSS()
{
$this->copyExternalFile($this->to);
- return 'background-image:url(' . wsHTML5Link::getUniversalLocation($this->to, true) . ');background-size:100% 100%;background-repeat:no-repeat;';
+ return 'background-image:url(' . $this->getImageUrl() . ');background-size:100% 100%;background-repeat:no-repeat;';
}
public function getAdditionnalContent()
{
$res = parent::getAdditionnalContent();
+ $res .= ' data-image="' . $this->getImageUrl() . '"';
$res .= ' data-rollover="' . $this->rollover . '"';
return $res;
}