uses preg_replace on siteTitle string to build technicalDocument URL
This commit is contained in:
parent
1e2a2e40a6
commit
3164787d19
|
@ -101,8 +101,9 @@ class ArchiveSiteMeta extends AbstractBlockLayout
|
||||||
$site = null;
|
$site = null;
|
||||||
} else {
|
} else {
|
||||||
$site = $view->site;
|
$site = $view->site;
|
||||||
//$tech_document_link = '<a href="'.$site->siteUrl().'/asset/'.$site->title().'.pdf'.'">Technical documentation</a>';
|
$site_title = $view->site->title();
|
||||||
$tech_document_link = '<a href="/files/docs/'.$site->title().'.pdf'.'">Technical documentation</a>';
|
$file_name = preg_replace( '/[^a-z0-9]+/', '-', strtolower($site_title) ).'.pdf';
|
||||||
|
$tech_document_link = '<a href="/files/docs/'.$file_name.'">Technical documentation</a>';
|
||||||
}
|
}
|
||||||
$archiveSiteHelper = $view->getHelperPluginManager()->get('archiveSiteMeta');
|
$archiveSiteHelper = $view->getHelperPluginManager()->get('archiveSiteMeta');
|
||||||
$collections = $archiveSiteHelper->getCollections();
|
$collections = $archiveSiteHelper->getCollections();
|
||||||
|
|
Loading…
Reference in New Issue