IMG path issue when using HTML block
Permalink
Hi to everyone,
Glad to be a part of a great community. Loving every bit of C5 so far, but I've stumbled across one issue I can't resolve. I'm integrating C5 into the existing HTML site. When I use HTML block and include an image, it won't show. I have tried multiple ways of defining the path, but nothing works to me. I tried including a full path to the file too and used other methods found in this forum.
Just for reference, the file type is PNG, I've tested the approach with several images and it's the same problem. However, when using file manager, it works just fine. I'm running C5 locally using MAMP.
Any help would be much appreciated. By the way, here's HTML code:
<img class="scroll-down" src="<?php echo $this->getThemePath(); ?>/c5/files/2014/0136/6981//images/scroll-down-white.png">
This file path is one of many I've tried..
Glad to be a part of a great community. Loving every bit of C5 so far, but I've stumbled across one issue I can't resolve. I'm integrating C5 into the existing HTML site. When I use HTML block and include an image, it won't show. I have tried multiple ways of defining the path, but nothing works to me. I tried including a full path to the file too and used other methods found in this forum.
Just for reference, the file type is PNG, I've tested the approach with several images and it's the same problem. However, when using file manager, it works just fine. I'm running C5 locally using MAMP.
Any help would be much appreciated. By the way, here's HTML code:
<img class="scroll-down" src="<?php echo $this->getThemePath(); ?>/c5/files/2014/0136/6981//images/scroll-down-white.png">
This file path is one of many I've tried..
Other ways to do what you want are
- Use a content block and the integrated file picker to place images within the content. It has an html view, but will filter out some html.
- Mix html blocks (for html) with image blocks (for images), then float the image blocks to get the desired wrap.
- Use an html block and embed a full image tag with URL - will fail if you move the site.
- Use a php block (install from the marketplace) - decidedly hazardous unless you really know what you are doing - and if you knew enough of that, you would instead ....
- Code a custom block from scratch.
EDIT
You could also use an html block with Magic Data to cleanly embed images from the file manager, but if all you want is images its a bit of an overkill.