背景:使用zurb基金会的数据交换,在Concrete5中运行。
在img src路径中使用php非常简单。
<img src="<?php echo $this->getThemePath(); ?>/images/myImage.png" >
但当我更进一步,传递参数等以使用数据交换时,事情会变得一团糟。我知道这可能与引号或括号之类的东西有关。帮助使用此代码?
<img src="<?php echo $this->getThemePath(); ?>/images/myImage.png" data-interchange="[<?php echo $this->getThemePath(); ?>/images/myImage.png, (default)], [<?php echo $this->getThemePath(); ?>/images/myImage_@2x.png, (retina)]">
尝试删除src="<?php echo $this->getThemePath(); ?>/images/myImage.png"
。这应该没有必要,因为您已经在数据交换参数中将该文件指定为默认文件。