From e13f29b4c8a53c20f201a242523c1707bb7a150e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 Oct 2017 21:29:49 +0200 Subject: [PATCH] Add ID of page --- htdocs/langs/en_US/website.lang | 1 + htdocs/websites/index.php | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index e42504f4706..b1ac20d2e7f 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -49,3 +49,4 @@ CreateByFetchingExternalPage=Create page/container by fetching page from externa OrEnterPageInfoManually=Or create empty page from scratch... FetchAndCreate=Fetch and Create ExportSite=Export site +IDOfPage=Id of page \ No newline at end of file diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php index ac3686528b5..95ef8f37948 100644 --- a/htdocs/websites/index.php +++ b/htdocs/websites/index.php @@ -275,9 +275,14 @@ if ($action == 'add') $objectpage->content = preg_replace('/^.*]*>/ims', '', $objectpage->content); $objectpage->content = preg_replace('/<\/body[^>]*>.*$/ims', '', $objectpage->content); + + // Now loop to fetch all css files. Include them inline into header of page + // TODO... + + $tmp = $objectpage->content; - // Now loop o to fetch all images + // Now loop to fetch all images preg_match_all('/]*)>/i', $objectpage->content, $regs); foreach ($regs[0] as $key => $val) { @@ -399,12 +404,13 @@ if ($action == 'add') if (! $error) { - $pageid = $objectpage->id; + $pageid = $objectpage->id; - // To generate the CSS, robot and htmlheader file. + // To generate the CSS, robot and htmlheader file. if (! dol_is_file($filehtmlheader)) { + // TODO use header of page for common header ? $htmlheadercontent = ""; $result=dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent); } @@ -1536,6 +1542,12 @@ if ($action == 'editmeta' || $action == 'create') if ($action != 'create') { + print ''; + print $langs->trans('IDOfPage'); + print ''; + print $pageid; + print ''; + print ''; print $langs->trans('WEBSITE_PAGEURL'); print '';