Creating a Blog

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 13, 2013   (RSS)

Hi there,

I'm trying to create a blog using CMS Builder.  Have done this before however has been awhile since I've worked with this.  In the code generator for section I am selecting the following: Combination List and Detail Page, show links to many records and full details on one record.

When the code is generated I am getting the the code to convert the html list page into php, the record (list) snippets I've created (Title, Created On date, Title 2, Content, Summary) in the section editor and the corresponding snippets for the full record detail page.  My question is, where is the code that I need to convert the full record detail page to php?  Hope that makes sense. 

Here are the pages:

http://www.enlightenthesoul.com/blog.html

http://www.enlightenthesoul.com/full_story.html

Also, for the list page, do I only need to paste the list snippets once?  I've selected 3 records per page...

also for pagination within the list page I have the following code in my previous blog: 

<!-- START PAGINATION CODE -->
 <?php if ($newsMetaData['prevPage']): ?>
   <a href="<?php echo $newsMetaData['prevPageLink'] ?>">&lt;&lt; prev</a>
 <?php else: ?>
   &lt;&lt; prev
 <?php endif ?>
 
 <?php  
    if (@!$_GET['page']): $current_page = "1";
    else: $current_page = $_GET['page'];    
  endif;  ?>
 
<?php foreach (range(1,$newsMetaData['totalPages']) as $page): ?>  
  <?php if ($page == $current_page): ?>
     <strong><?php echo $page; ?></strong>
   <?php else: ?>
     <a href="?<?php echo http_build_query(array_merge($_REQUEST, array( 'page' => $page ))) ?>"><?php echo $page; ?></a>
   <?php endif ?>
<?php endforeach; ?>
 
 <?php if ($newsMetaData['nextPage']): ?>
   <a href="<?php echo $newsMetaData['nextPageLink'] ?>">next &gt;&gt;</a>
 <?php else: ?>
   next &gt;&gt;
 <?php endif ?>
<!-- /END PAGINATION CODE -->

Will this suffice for pagination code if I swap $newsMetaData WITH $ets_blogMetaData?

Thanks!

ep

By knight_oWL19 - May 13, 2013 - edited: May 13, 2013

Thanks Jerry,

I will look more closely at this and give it a go.  I understand how to convert the pages, I just didn't see the header code for the full record page.  maybe I missed it.

also, any thoughts on the pagination code?

ep