You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to develop a dropdown list of published pages when creating a new page. I just want to assign a parent page for each page. How can I show a list of all published pages excluding the current page and assign it to the current page(like an about us, contact us page under about page)?
When I write this code it show error in page_edit.htm
Internal Server Error
Object of class Model\Page could not be converted to string
$parent = new \Model\Page();
$parent->filter('page',array('published = ? and publish_date <= ?', true, date('Y-m-d')));
$parent->countRel('page');
$this->response->data['parents'] = $parent->find(null,array('order'=>'title asc'));;
$f3->set('parents',$this->resource->exec("SELECT title FROM fblg_pages where id!='".$params['id']."' and published=1 order by title asc"));
When I tried this code
$f3->set('parents',$this->resource->exec("SELECT title FROM fblg_pages where id!='".$params['id']."' and published=1 order by title asc"));
It show me error- Fatal error: Call to undefined method Model\Page::exec()
How can I call exec in a controller?
The text was updated successfully, but these errors were encountered:
Model\Page is a Db\Cortex object, which is extended from the Db\Cursor class. Exec() exists in the Db\Sql class, not in the Db\Cursor nor DB\Cortex (which try to remain database system agnostic I think?). If you have an sql database active, try $db->exec('your sql statement')?
I don't think your problem is tied to the fact your code is inside a controller.
Hi,
I'm trying to develop a dropdown list of published pages when creating a new page. I just want to assign a parent page for each page. How can I show a list of all published pages excluding the current page and assign it to the current page(like an
about us
,contact us
page underabout
page)?When I write this code it show error in page_edit.htm
Internal Server Error
Object of class Model\Page could not be converted to string
When I tried this code
It show me error-
Fatal error: Call to undefined method Model\Page::exec()
How can I call exec in a controller?
The text was updated successfully, but these errors were encountered: