files meta tags finished
This commit is contained in:
parent
1a6602c387
commit
81266a1d2e
@ -29,6 +29,10 @@ class FilesHandler extends request_handler {
|
||||
if (!$folder)
|
||||
not_found();
|
||||
$files = books_get($folder_id);
|
||||
add_meta([
|
||||
'$title' => lang('meta_files_book_folder_title', $folder->getTitle()),
|
||||
'$description' => lang('meta_files_book_folder_description', $folder->getTitle())
|
||||
]);
|
||||
set_title(lang('files').' - '.$folder->title);
|
||||
render('files/folder',
|
||||
folder: $folder,
|
||||
@ -48,11 +52,6 @@ class FilesHandler extends request_handler {
|
||||
add_skin_strings([
|
||||
'files_search_results_count'
|
||||
]);
|
||||
if (!$folder_id && !$query)
|
||||
add_meta([
|
||||
'$title' => lang('meta_files_collection_title', lang('files_'.$collection->value.'_collection')),
|
||||
'$description' => lang('meta_files_'.$collection->value.'_description')
|
||||
]);
|
||||
|
||||
$vars = [];
|
||||
$text_excerpts = null;
|
||||
@ -136,6 +135,20 @@ class FilesHandler extends request_handler {
|
||||
$title .= ' - '.htmlescape($query);
|
||||
set_title($title);
|
||||
|
||||
if (!$folder_id && !$query)
|
||||
add_meta([
|
||||
'$title' => lang('4in1').' - '.lang('meta_files_collection_title', lang('files_'.$collection->value.'_collection')),
|
||||
'$description' => lang('meta_files_'.$collection->value.'_description')
|
||||
]);
|
||||
else if ($query || $parents) {
|
||||
add_meta([
|
||||
'$title' => lang('4in1').' - '.$title,
|
||||
'$description' => lang('meta_files_'.($query ? 'search' : 'folder').'_description',
|
||||
$query ?: $parents[count($parents)-1]->getTitle(),
|
||||
lang('files_'.$collection->value.'_collection'))
|
||||
]);
|
||||
}
|
||||
|
||||
render('files/collection',
|
||||
...$vars,
|
||||
collection: $collection,
|
||||
|
@ -28,6 +28,10 @@ meta_files_title: "4in1 - Files"
|
||||
meta_files_description: "Large archive of files and documents that provide the evidentiary basis for the \"4in1\" investigation."
|
||||
|
||||
meta_files_collection_title: "4in1 - %s"
|
||||
meta_files_book_folder_title: "4in1 - Files - %s"
|
||||
meta_files_book_folder_description: "\"%s\" directory in the 4in1 materials archive."
|
||||
meta_files_folder_description: "\"%s\" directory in the \"%s\" archive."
|
||||
meta_files_search_description: "Search results for \"%s\" in the \"%s\" archive."
|
||||
meta_files_wff_description: "Searchable archive of declassified NSA documents related to the career of William. F. Friedman. Over 52,000 pages in more than 7,500 files."
|
||||
meta_files_mdf_description: "Searchable archive of all Mercure de France issues of 1920-1940 period."
|
||||
meta_files_baconiana_description: "Searchable archive of Baconiana almanac."
|
||||
|
Loading…
x
Reference in New Issue
Block a user