Blog Problems - parsing error

6 posts by 4 authors in: Forums > CMS Builder
Last Post: June 13, 2013   (RSS)

Hello,

I have been at this all day :(  I managed to get the details page working (for first record) fine when you go directly to it in URL.  http://enlightenthesoul.com/full_story.php

However when I click on Back to List link I get the following pop-up window:  Set List Page Url for this section in: Admin > Section Editors > ETS Blog > Viewer Urls

When I click on blog page I get the following error:  Parse error: syntax error, unexpected $end in /home/enlig124/public_html/blog.php on line 227

I have combed through this several times and cannot see where the problem has occurred.  In need of some assistance from the pros!

Thankyou,

ko19

By moh3 - June 13, 2013

hello,

1- for Set List Page Url for this section in: Admin > Section Editors > ETS Blog

go to the section editor named ( ETS Blog ) at the top there is tab for writing the name of the file you are using to list your blog posts

it maybe a full url ( http://example/blog.php ) or ( blog.php ) depends on how folder of your site is done, noting i usually don't use this you could do something

like ( blog.php?id=<?php echo $record['num'];?> ) in your html code then you would create blog.php and you would write

$id=$_GET['id'];

list($tabel_record, $tabel_meta) = getRecords(array(
  'tableName'   => "{$tableName}",
  'where' => "num=$id",
  'limit'=> 1,
  'loadUploads' => true,
  'allowSearch' => false
  ));

and loop over all records

2- Parse error: syntax error, unexpected $end maybe cause due to php short tags such as:

foreach( $records as $record ) :

endforeach;

if you try instead

foreach( $records as $record ) {

}

Thankyou for this; I've set the Viewer URL's and I am still getting the same. 

By gregThomas - June 13, 2013

Hi,

Could you attach /copy your code into a post for me? What have you set the  List Page URL as?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Damon - June 13, 2013

Hi,

The blog is now displaying correctly. The issue was that the blog foreach loop was missing the closing foreach code:

<?php endforeach; ?>

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/