0

Background: using zurb foundation's data-interchange, running in Concrete5.

Using php inside an img src path is easy enough.

<img src="<?php echo $this->getThemePath(); ?>/images/myImage.png" \>

But when I go further, passing parameters and such to use data-interchange, things get messy. I know it probably has something to do with quotes or parentheses and such. Help with this code?

<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)]">
  • Hardoce an HTML source that's working and compare it with your generated source. The error resides in the differences – Laurent S. Jul 05 '13 at 16:35
  • Thanks. After trying that, I'm successfully loading the image named in the src="/image/myImage" But now I'm not seeing the exchange take place with the data-interchange parameters. I'm certain the foundation.interchange.js file is loaded. Just no result. – RipVanWinkle Jul 05 '13 at 18:22

1 Answers1

0

Try removing src="<?php echo $this->getThemePath(); ?>/images/myImage.png". It shouldn't be necessary since you have that file specified as the default in the data-interchange parameter.

DSG
  • 436
  • 3
  • 4