Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I am constructing my site on the portable wampp so that I can get the hang of couchcms before I work on the site proper. So far so good everything has gone fine but whilst working on the news portion which is being built like a blog, I embedded newslist.html into news.php and I get a distorted page in internet explorer, google and firefox also have same distortions.

it looks like some external css from couch is acting on it
Hi and welcome @tunmife,

Embedding a snippet in Couch (using cms:embed tag) is exactly the same (with just one exception that I'll mention next) as copy/pasting the code from the snippet file into the main template. You can try doing so and see if the distortion still occurs. If it does, we'll have to look into the HTML markup for the reason.

The one exception that I mentioned was the raw PHP tags that need a little tweak to get them to work within embedded snippets.
For example, if following was the original code in the main template -
Code: Select all
<?php echo 'hello world'; />

- moving it to within a snippet will not work. To make it work, we'll have to use Couch's tag for PHP. This is the modified version -
Code: Select all
<cms:php>echo 'hello world';</cms:php>

It is a small change. Just substitute <?php and ?> with <cms:php> and </cms:php>

Please check if your embed is not using raw PHP (e.g. to include files etc.). Making the mentioned change should rectify the problem.

Finally, if the problem still persists, please post in the original template and the one that uses the embed (along with the snippet) and I'll check what might be going wrong.

Thanks.
2 posts Page 1 of 1
cron