Extrafiel image only url

only url

<?php

$imageFD=$this->item->extraFields->SectionOne_Image->value;

$srcFD=explode('src="', $imageFD);

$srcFD=$srcFD[1];

$urlFD = strstr($srcFD, '"', true);

echo  $urlFD;

?>

Extra field image type as link

<?php 
$var = $this->item->extraFields->Image->value ;     
$var = preg_replace('/<img src="/',"",$var); 
$var = preg_replace('/" alt="Image" \>/'," ",$var); 
echo '<a href="' . $var . "TextOfLink" . "</a>" ; 
?>

Valora este artículo
(0 votos)
Visto 189 veces