pyams_content.features.share
package ⊞¶
Subpackages¶
pyams_content.features.share.container
¶
pyams_content.features.share.interfaces
¶
-
interface
pyams_content.features.share.interfaces.
ISocialShareInfo
[source]¶ General social share information interface
-
twitter_account
¶ Twitter account
Name of Twitter account (including leading ‘@’) to use for website attribution
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
twitter_creator_account
¶ Contents creator account
You can use another Twitter account (including leading ‘@’) for contents attribution; if empty, general Twitter account will be used
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
fb_account
¶ Facebook account
Complete URL of Facebook account used for content attribution
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
fb_app_id
¶ Facebook AppID
ID of a Facebook App matching your web site
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
-
interface
pyams_content.features.share.interfaces.
ISocialShareItem
[source]¶ Social network share item interface
-
__parent__
¶ Implementation: zope.schema.Field
Read Only: False Required: True Default Value: None
-
active
¶ Active item?
If ‘no’, selected item is inactive
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: True Allowed Type: bool
-
label
¶ Label
This label will be associated to share link
Implementation: pyams_i18n.schema.I18nTextLineField
Read Only: False Required: True Default Value: None Allowed Type: dict
Key Type
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
Value Type
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
target_url
¶ Content share URL
URL used to share this content on given network; {url} string will be replaced automatically by content canonical URL, and {title} by content title (if required)
Implementation: pyams_i18n.schema.I18nTextLineField
Read Only: False Required: True Default Value: None Allowed Type: dict
Key Type
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
Value Type
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
get_url
(self, context, request)¶ Get canonical URL for given context and request
-
pictogram_name
¶ Pictogram
Name of pictogram associated with this social network
Implementation: zope.schema.Choice
Read Only: False Required: False Default Value: None
-
pictogram
¶ Selected pictogram object
-
-
interface
pyams_content.features.share.interfaces.
ISocialShareManager
[source]¶ Extends:
pyams_content.interfaces.container.IOrderedContainer
Social network share item container interface
-
__setitem__
(key, value)¶ Add the given object to the container under the given name.
Raises a
TypeError
if the key is not a unicode or ascii string.Raises a
ValueError
if the key is empty, or if the key contains a character which is not allowed in an object name.Raises a
KeyError
if the key violates a uniqueness constraint.The container might choose to add a different object than the one passed to this method.
If the object doesn’t implement IContained, then one of two things must be done:
- If the object implements ILocation, then the IContained interface must be declared for the object.
- Otherwise, a ContainedProxy is created for the object and stored.
The object’s __parent__ and __name__ attributes are set to the container and the given name.
If the old parent was
None
, then an IObjectAddedEvent is generated, otherwise, an IObjectMovedEvent is generated. An IContainerModifiedEvent is generated for the container.If the object replaces another object, then the old object is deleted before the new object is added, unless the container vetos the replacement by raising an exception.
If the object’s __parent__ and __name__ were already set to the container and the name, then no events are generated and no hooks. This allows advanced clients to take over event generation.
-
append
(self, value, notify=True)¶ Append given pictogram item to container
-
get_active_items
(self)¶ Get list of visible pictogram items
-