Blog posts and news items on homepage?

6 posts by 2 authors in: Forums > CMS Builder
Last Post: November 18, 2008   (RSS)

By bruno - November 17, 2008

Hello,

Newbie with this CMS here - trying to figure out how to get articles or blogs to show up on a homepage with news items in a sidebar.

http://tinymouse.biz/cmstest/index-blog.php

Ive been able to get news items on a page, and blog or articles on a page, but not together. I know there must be some simple way to do this. All I am doing is using the generated code and placing it in my pages.

Thanks!

Re: [bruno] Blog posts and news items on homepage?

By Dave - November 17, 2008

Hi Bruno,

Typically you just copy and paste multiple blocks of viewer code where you want them to appear. It looks like something isn't quite in the right place, though.

Can you attach the index-blog.php file to this post so we can see the code? Then I can take you look and give some suggestions.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Blog posts and news items on homepage?

By bruno - November 18, 2008

Thanks Dave,

I think im basically trying to have two lists - news and blog posts/articles show up on the same page.

Could it be that both blocks of user code need to be at the top of the document? or do i need to combine these in some day?


<?php

require_once "/nfs/c01/h04/mnt/44900/domains/tinymouse.biz/html/cmsAdmin/lib/viewer_functions.php";

list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
));

?>

and this:


<?php

require_once "/nfs/c01/h04/mnt/44900/domains/tinymouse.biz/html/cmsAdmin/lib/viewer_functions.php";

list($blogRecords, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
));

?>
Attachments:

index-blog.php 13K

Re: [bruno] Blog posts and news items on homepage?

By bruno - November 18, 2008

I think to further clarify im trying to combine a news list page and a blog list page

Re: [bruno] Blog posts and news items on homepage?

By bruno - November 18, 2008

Actually I got this to work by placing the step1 code inside of each divL

<?php

require_once "/nfs/c01/h04/mnt/44900/domains/tinymouse.biz/html/cmsAdmin/lib/viewer_functions.php";

list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
));
?>

It seems that this code does not need to be at the top of the page. Is this correct?

http://tinymouse.biz/cmstest/listTest.php