Using 'external files' for page information

Hi there, I have a website which uses Concrete as the main CMS, but some of the pages are dynamically driven and pulls info from a seperate database


This drags in info for the page title (id=“itemName”) and also allows me to load an image onto the screen which is the same as the page title (stored in a seperate folder to the CMS files). So, I have got (for example):

page title: ‘Fuchsia Dark Eyes’
image: ‘Fuchsia Dark Eyes.jpg’

What I want to do is use this info for the Page Title and thumbnail for sharing purposes (rather than just plant?id=43 or a hardcoded generic name and thumb) and for the browser tab…

I think I did this before in Concrete5.6 but for the life of me I can’t find it and I’m sure it is a different kettle of fish in 8.5.1

If anyone can point me in the right direction, I’d be very grateful. Thank you :slight_smile:

If “plant” is actual concrete page with template, you can just use this code in head (it’s usually elements/header_top.php)

View::element('header_required', [
    'pageTitle' => isset($pageTitle) ? $pageTitle : '',
    'pageDescription' => isset($pageDescription) ? $pageDescription : '',
    'pageMetaKeywords' => isset($pageMetaKeywords) ? $pageMetaKeywords : ''

to replace page title (use your own logic to assign something to $pageTitle, it can be done in view or page type controller).

For thumbnail, you can add your own opengraph tags (I assume its for sharing page on social sites like Facebook).