Back to index

plone3  3.1.7
addtoFavorites Namespace Reference


tuple mtool = getToolByName(script, 'portal_membership')
tuple home = mtool.getHomeFolder()
tuple favorites = getattr(home, 'Favorites')
string f_id = 'fav_'
tuple f_title = context.TitleOrId()
tuple f_url = context.absolute_url()
tuple homeFolder = context.portal_membership.getHomeFolder()
tuple state = context.restrictedTraverse("@@plone_context_state")
string view_url = '%s/%s'
list addable_types = ['Favorite']
 favs = homeFolder.Favorites
 targetFolder = homeFolder.Favorites
string new_id = 'fav_'
tuple myPath = context.portal_url.getRelativeUrl(context)
tuple fav_id = targetFolder.invokeFactory('Favorite', id=new_id, title=context.TitleOrId(), remote_url=myPath)
tuple favorite = getattr(targetFolder, fav_id, None)
tuple msg

Variable Documentation

list addtoFavorites.addable_types = ['Favorite']

Definition at line 23 of file

string addtoFavorites.f_id = 'fav_'

Definition at line 12 of file

tuple addtoFavorites.f_title = context.TitleOrId()

Definition at line 13 of file

tuple addtoFavorites.f_url = context.absolute_url()

Definition at line 14 of file

tuple addtoFavorites.fav_id = targetFolder.invokeFactory('Favorite', id=new_id, title=context.TitleOrId(), remote_url=myPath)

Definition at line 33 of file

tuple addtoFavorites.favorite = getattr(targetFolder, fav_id, None)

Definition at line 35 of file

tuple addtoFavorites.favorites = getattr(home, 'Favorites')

Definition at line 10 of file

addtoFavorites.favs = homeFolder.Favorites

Definition at line 24 of file

tuple addtoFavorites.home = mtool.getHomeFolder()

Definition at line 7 of file

tuple addtoFavorites.homeFolder = context.portal_membership.getHomeFolder()

Definition at line 14 of file

Initial value:
00001 _(u'${title} has been added to your Favorites.',
00002             mapping={u'title' : context.title_or_id()})

Definition at line 41 of file

tuple addtoFavorites.mtool = getToolByName(script, 'portal_membership')

Definition at line 5 of file

tuple addtoFavorites.myPath = context.portal_url.getRelativeUrl(context)

Definition at line 32 of file

string addtoFavorites.new_id = 'fav_'

Definition at line 31 of file

addtoFavorites.RESPONSE = context.REQUEST.RESPONSE

Definition at line 13 of file

tuple addtoFavorites.state = context.restrictedTraverse("@@plone_context_state")

Definition at line 15 of file

addtoFavorites.targetFolder = homeFolder.Favorites

Definition at line 30 of file

string addtoFavorites.view_url = '%s/%s'

Definition at line 16 of file