Last active
May 26, 2016 18:10
-
-
Save bjornbjorn/4039233 to your computer and use it in GitHub Desktop.
SEO Lite pulling in additional fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from config.local.php (FocusLab's config) | |
/** | |
* | |
* Pull additional info for SEO Lite | |
* | |
* channel_id => array(field_id => tag_name) | |
**/ | |
$env_config['seolite_extra'] = array( | |
'1' => array( // news | |
'desc' => array( | |
'field_id' => 3, | |
'field_type' => 'text', | |
), | |
'image' => array( | |
'field_id' => 45, | |
'field_type' => 'file', | |
) | |
), | |
'4' => array( // blog | |
'desc' => array( | |
'field_id' => 18, | |
'field_type' => 'text', | |
), | |
'image' => array( | |
'field_id' => 46, | |
'field_type' => 'file', | |
) | |
), | |
'5' => array( // portfolio | |
'desc' => array( | |
'field_id' => 29, | |
'field_type' => 'text', | |
), | |
'image' => array( | |
'field_id' => 43, | |
'field_type' => 'assets', // Assets fieldtype, will pick the first image if multiple can be selected | |
) | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title>{title}{site_name}</title> | |
<meta name='keywords' content='{meta_keywords}' /> | |
<meta name='description' content='{meta_description}' /> | |
<link rel='canonical' href='{canonical_url}' /> | |
<meta property="og:url" content="{canonical_url}"/> | |
<meta property="og:title" content="{entry_title}"/> | |
<meta property="og:description" content="{extra:desc}"/> | |
<meta property="og:image" content="{extra:image}"/> |
Hi Bjorn, where do I have to put the config.local.php file? Thanks
@bjornbjorn going over old ground here perhaps but I'm seeing the same thing attempting to pull through the full path to an Assets image where it just pulls out image.jpg as an example.
This makes sense though because field_id_x assigned in the config only has image.jpg as the example. I guess I could update the path within the template and restrict the upload directory but would be cool to be able to pull from where ever I want.
Can you use this plugin on EE version 2.6.1?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updating from seo lite 1.4.7 to 1.4.9.3 fixed the issue with the full path to the image.
Was using assets file type if this is of help to anyone else.
Thanks Bjorn.