Add author management functionality and update routing rules
- Updated .htaccess rules to allow trailing slashes for specific routes. - Introduced a new .gitignore file to exclude the cache directory. - Created project configuration file for Serena with language and tool settings. - Implemented Authors class for managing author data, including methods for saving, deleting, and editing authors. - Added factory class for Authors to handle database interactions related to authors. - Developed Article class to manage article data and interactions, including fetching articles and updating views. - Created Page class with a placeholder method for sorting pages. - Added front factory class for fetching author details with caching.
This commit is contained in:
@@ -11,15 +11,15 @@ class Pages
|
||||
$tpl -> step = $step;
|
||||
return $tpl -> render( 'pages/subpages-browse-list' );
|
||||
}
|
||||
|
||||
public static function browse_list( $menus, $modal = false )
|
||||
|
||||
static public function browse_list( $menus, $modal = false )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> menus = $menus;
|
||||
$tpl -> modal = $modal;
|
||||
return $tpl -> render( 'pages/pages-browse-list' );
|
||||
return \Tpl::view( 'pages/pages-browse-list', [
|
||||
'menus' => $menus,
|
||||
'modal' => $modal
|
||||
] );
|
||||
}
|
||||
|
||||
|
||||
public static function page_articles( $page_id, $articles )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
@@ -27,7 +27,7 @@ class Pages
|
||||
$tpl -> articles = $articles;
|
||||
return $tpl -> render( 'pages/page-articles' );
|
||||
}
|
||||
|
||||
|
||||
public static function page_edit( $page, $parent_id, $menu_id, $menus, $layouts, $languages, $settings )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
@@ -39,23 +39,23 @@ class Pages
|
||||
$tpl -> languages = $languages;
|
||||
$tpl -> settings = $settings;
|
||||
return $tpl -> render( 'pages/page-edit' );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function menu_edit( $menu )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> menu = $menu;
|
||||
return $tpl -> render( 'pages/menu-edit' );
|
||||
}
|
||||
|
||||
|
||||
public static function pages_list( $menus )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> menus = $menus;
|
||||
return $tpl -> render( 'pages/pages-list' );
|
||||
return $tpl -> render( 'pages/pages-list' );
|
||||
}
|
||||
|
||||
|
||||
public static function subpages_list( $pages, $parent_id = null, $step = 1 )
|
||||
{
|
||||
$tpl = new \Tpl();
|
||||
|
||||
Reference in New Issue
Block a user