Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install collective.opengraph

How to install collective.opengraph

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install collective.opengraph
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
1.0.1 Available View build log
Linux (32-bit)
1.0.1 Available View build log
Linux (64-bit)
1.0.1 Available View build log
 
License
GPL
Depended by
Lastest release
version 1.0.1 on Nov 21st, 2012

collective.opengraph

This package is a part of the Plone's collective.fg bundle. It adds the opengraph metadata to your HTML head section.

Supported metadata:
  • og:site_name name of the site
  • og:url url of the webpage
  • og:title title of the webpage
  • og:description description of the webpage
  • og:image your webpage image (either 'image' field of your context or collective.contentleadimage one)

from the control panel you can manage following settings: - the default og:type - which content types should be opengraph metadata aware

Customization

One of the goals of this package is to allow developers extend the default metadata definition. It's availabe threw IOpengrapMetatags adapter:

from collective.opengraph.interfaces IOpengraphMetatags
from collective.opengraph.viewlets import ATMetatags

class MyATMetatags(ATMetatags):

    implements(IOpengrapMetatags)

    @property
    def metatags(self):
        tags = super(MyATMetatags, self).metatags
        tags.update({'og:newtype': 'custom value'})
        return tags

You can also customize existing og values:

from collective.opengraph.interfaces IOpengraphMetatags
from collective.opengraph.viewlets import ATMetatags

class AnotherMetatags(ATMetatags):

    implements(IOpengrapMetatags)

    @property
    def title(self):
        return '%s - Lorem ipsum' % self.context.Title()

Changelog

1.0.1 (2012-10-16)
  • Docs update and fixed manifest file [amleczko]
1.0 (2012-10-15)
  • refactored and release during PloneConf2012 sprint [amleczko]
0.1dev (unreleased)
  • added action to (un)mark 'IOpengraphable' content types
  • added translations
  • registered viewlet for 'IOpengraphable' content types
  • added og:type meta tag
  • added default configurations in IRegistry
  • first release

Subscribe to package updates

Last updated Nov 21st, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.