Add table of contents generation and header ID processing to Articles class
- Implemented `generateTableOfContents` method to create a structured table of contents from article content. - Added `processHeaders` method to ensure headers have unique IDs for linking. - Updated `generateHeadersIds` to apply ID generation to headers in article content. - Modified `article_full` method to include table of contents in rendered articles. - Enhanced `submenu_details` and `subpages` methods in Menu class to support language ID. - Updated caching mechanisms to include language ID for subpages and menu details. - Refactored various methods in Articles view class for improved readability and consistency. - Added new sftp configuration file for deployment settings.
This commit is contained in:
@@ -238,7 +238,7 @@ class Articles
|
||||
}
|
||||
|
||||
public static function article_save(
|
||||
$article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_date_add, $date_add, $show_date_modify, $seo_link, $meta_title, $meta_description,
|
||||
$article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_table_of_contents, $show_date_add, $date_add, $show_date_modify, $seo_link, $meta_title, $meta_description,
|
||||
$meta_keywords, $layout_id, $pages, $noindex, $repeat_entry, $copy_from, $social_icons, $event_date, $tags, $block_direct_access, $priority,
|
||||
$password, $pixieset, $id_author, $params )
|
||||
{
|
||||
@@ -251,6 +251,7 @@ class Articles
|
||||
{
|
||||
$mdb -> insert( 'pp_articles', [
|
||||
'show_title' => $show_title == 'on' ? 1 : 0,
|
||||
'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0,
|
||||
'show_date_add' => $show_date_add == 'on' ? 1 : 0,
|
||||
'show_date_modify' => $show_date_modify == 'on' ? 1 : 0,
|
||||
'date_add' => $date_add ? $date_add : date( 'Y-m-d H:i:s' ),
|
||||
@@ -435,6 +436,7 @@ class Articles
|
||||
{
|
||||
$mdb -> update( 'pp_articles', [
|
||||
'show_title' => $show_title == 'on' ? 1 : 0,
|
||||
'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0,
|
||||
'show_date_add' => $show_date_add == 'on' ? 1 : 0,
|
||||
'show_date_modify' => $show_date_modify == 'on' ? 1 : 0,
|
||||
'date_modify' => date( 'Y-m-d H:i:s' ),
|
||||
|
||||
Reference in New Issue
Block a user