Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
The embeds on my other pages are working, but this page doesn't want to play nice: http://dawn-creative.com/svtap/trails.php

I have two embeds, one is the nav (which is used on every other single page, and works) and the other is the sidebar. I have them saved in the snippets and I really can't think of anything else.

Any suggestions? Thank you.

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Star Valley Trails and Pathways</title>

<link rel="stylesheet" type="text/css" href="style/style.css" />

<meta name="viewport" content="user-scalable=no" />

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
  function initialize() {
    var latlng = new google.maps.LatLng(42.92076, -111.00216);
    var myOptions = {
      zoom: 10,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.HYBRID
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
      myOptions);
   
   var marker = new google.maps.Marker({
      position: latlng,
      map: map,
      title:"Thayne, WY"
  });   
   }
</script>


</head>

<body onload="initialize()">

<div id="scroll">

   <div id="header"> <a href="/"><img src="images/svtap_logo.png" width="162" height="116" alt="star valley trails and pathways logo"/></a>
   
       <div id="nav">
           <cms:embed 'nav.php' />
        </div>

  </div>
 
  <div id="content-container">
 
     <div id="main-content">
       <div id="map_canvas"></div>
    </div>
   
    <div id="sidebar">
        <div class="sidebar-section">
         <cms:embed 'trails_updates.html' />
        </div>
    </div>
   
    <div style="clear:both"></div>
  </div>
 
<div style="clear:both"></div>

</div>

<div id="footer"></div>

</body>
</html>
Hi

I am testing it in the mean time kindly make sure that you put the
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
in the begining of the template and
Code: Select all
<?php COUCH::invoke(); ?> 
in the end of the template.

more help http://www.couchcms.com/docs/tags-reference/embed.html

Regards
ARK
Hi,
I had a look at the source of 'trails.php' as it appears in the browser and the <cms:embed 'nav.php' /> and the <cms:embed 'trails_updates.html' /> statements are showing up unprocessed by Couch.

This happens when the template is not managed by Couch.
Are you sure the template 'trails.php' is showing up at all in the Couch admin panel?
If not, as ARK rightly pointed out above, please enclose your template with the two PHP statements and then visit 'trails.php' being logged in as super-admin.
This will cause Couch to recognize 'trails.php' as a managed template and then the couch tags e.g. <cms:embed ../> etc. to take effect.

Please let us know.
Thanks
Awesome, that did the trick. Thanks!

Do I need to put that on every page, no matter what?
Hi,

Glad it worked.

You need to place those two lines in all top level templates (the masterpages) - i.e. those that are accessed by placing their names after your site's URL. e.g. http://www.yourdomain.com/contact.php - here 'contact.php' will require the two PHP lines.

These top level templates in turn can contain embedded php files (called vis <cms:embed .. />). These embedded templates do not require those lines.

Hope that answers your question.
Yes, that makes much more sense now. Thank you!
6 posts Page 1 of 1
cron