Hi,
Am trying to display the 2 most recent news item on the index page of my site. Unfortunately am not able to do so as i keep getting the ERROR: Tag "pages": masterpage 'news.php' not found. Here's my code from the index page
This is the code for news_sidebar.html
The code for new.php is
What am I doing wrong?
Am trying to display the 2 most recent news item on the index page of my site. Unfortunately am not able to do so as i keep getting the ERROR: Tag "pages": masterpage 'news.php' not found. Here's my code from the index page
- Code: Select all
<?php require_once('admin/cms.php'); ?>
<cms:template title='Home Page' />
<cms:pages masterpage='news.php' />
<!DOCTYPE html>
<html lang="">
<head><!-- edited to make code short --></head>
<body>
<div class="container">
<?php require_once('includes/brand.php'); ?>
<?php require_once('includes/navigation.php'); ?>
<section>
<cms:editable name='main_content' type='richtext'>
<div class="col-md-4">
<h1>Title</h1>
<p>some text</p>
<p>some more text</p>
</div>
<div class="col-md-4">
<h1>Title</h1>
<p>some text</p>
</div>
</cms:editable>
<!-- News area -->
<div class="col-md-4">
<cms:embed 'news_sidebar.html' />
</div>
</section>
</div>
</body>
</html>
<?php COUCH::invoke(); ?>
This is the code for news_sidebar.html
- Code: Select all
<h1>Latest News</h1>
<cms:pages masterpage='news.php' limit='2'>
<h3><cms:show k_page_title /></h3>
<cms:excerptHTML count='30' ignore='img'><cms:show news_content /></cms:excerptHTML>
<p class="clearfix"><a href="<cms:show k_page_link />" class="btn btn-success pull-right"> Read More...</a></p>
</cms:pages>
The code for new.php is
- Code: Select all
<?php require_once('admin/cms.php'); ?>
<cms:template title='News' clonable='1'>
<cms:editable name='news_content' type='richtext' />
<cms:editable name='news_photo'
crop='1'
width='610'
height='150'
type='image'
/>
</cms:template>
<cms:if k_is_page >
<!DOCTYPE html>
<html lang="">
<head>
<!-- removed this part to make code short -->
</head>
<body>
<div class="container">
<?php require_once('includes/brand.php'); ?>
<?php require_once('includes/navigation.php'); ?>
<section id="news">
<!-- news post area -->
<div class="col-md-8" id="news-list">
<!-- news post -->
<div class="post">
<!-- Post Title -->
<h3><cms:show k_page_title /></h3>
<!-- Post Data -->
<p><cms:date k_page_date /> •</p>
<div class="hr dotted clearfix"> </div>
<!-- Post Image -->
<img class="img-responsive news-photo" alt="" src="<cms:show news_photo />" />
<!-- Post Content -->
<cms:show news_content />
<!-- ./post content -->
<!-- navigation buttons -->
<p class="clearfix">
<a href="news.php" class="btn btn-success pull-right">Back</a>
</p>
</div>
<hr>
</div>
<!-- ./news post area -->
</section>
</body>
</html>
<cms:else />
<cms:embed 'news_list.php' />
</cms:if>
<?php COUCH::invoke(); ?>
What am I doing wrong?