Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save bjornbjorn/4039233 to your computer and use it in GitHub Desktop.

Select an option

Save bjornbjorn/4039233 to your computer and use it in GitHub Desktop.
SEO Lite pulling in additional fields
// 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
)
)
);
<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}"/>
@milliephanillie

Copy link
Copy Markdown

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