Problems, need help? Have a tip or advice? Post it here.
12 posts Page 2 of 2
YES!!!!! Thank you so much!!

Can you let me know what you did so I can learn this stuff and not make the same mistake in the future?!
The primary mistake was this -
Code: Select all
<cms:embed 'blog_list.php' />

The code above is syntactically correct and it is embedding a template named 'blog_list.php' that resides within the 'couch/snippets' folder.
When I looked at your site I found that that the 'blog_list.php' was in fact residing in the same folder as the calling 'blog.php'.
This is the reason why you were getting the blank page - there was no 'blog_list.php' within 'snippets' folder to get embedded.
I moved the template to its correct location and the blank page disappeared.

Rest were only minor issues -
1. Changed the following code
Code: Select all
<?php include("Library/nav.php"); ?>

Code: Select all
<cms:embed 'nav.php' />

and moved the 'nav.php' from the 'Library' folder to the 'couch/snippets' folder.

2. Similarly changed the following line
Code: Select all
<cms:php> include 'blog_sidebar.html'; </cms:php>

to (as you can guess now)
Code: Select all
<cms:embed 'blog_sidebar.html' />

and moved the 'blog_sidebar.html' to the 'couch/snippets' folder.

The overall modified 'blog.php' now becomes -

Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Blog' clonable='1' commentable='1'>
   <cms:editable name='blog_content' type='richtext' />
    <cms:editable name='blog_image'
    <cms:folder name="svtap" title="SV Trails & Pathways" />
    <cms:folder name="trails" title="Trails" />
    <cms:folder name="events" title="Events" />


<cms:if k_is_page >

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Star Valley Trails and Pathways | Your trails destination</title>

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



<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 id="content-container">
     <div id="main-content">
    <!--BLOG POST-->

            <h1><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h1>
            <!--Post Data-->
            <p><cms:if k_page_foldertitle >
                <cms:set my_category=k_page_foldertitle />
            <cms:else />
                <cms:set my_category='Uncategorised' />
            </cms:if> <cms:show my_category /> &bull; <cms:date k_page_date format='M jS, Y' /> &bull; Comments: <cms:show k_comments_count /></p>
            <!--Post Image-->
            <img class="thumb" src="<cms:show blog_image />" alt=""/>
            <!--Post Content-->
            <p><cms:show blog_content /></p>

    <div id="sidebar">
          <cms:embed 'blog_sidebar.html' />
        <div style="clear:both"></div>
    <div style="clear:both"></div>
<div style="clear:both"></div>


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


<cms:else />
   <cms:embed 'blog_list.php' />

<?php COUCH::invoke(); ?>

It seems that you were having some trouble in using the 'embed' tag correctly.
Hope the rectified template will make its usage a bit clearer.
12 posts Page 2 of 2