常用的工具视图和方法

常用的工具视图和方法
本帖最后由 adam(三人行) 于 2011-9-12 10:24 编辑

Available Views and Methods
About the siteView @@plone_portal_state

[table]
[tr][td]Method[/td][td]What you get[/td][td]global defines[/td][/tr]
[tr][td]portal[/td][td]Portal Object[/td][td]portal[/td][/tr]
[tr][td]portal_title[/td][td]The title of your site[/td][td]portal_title[/td][/tr]
[tr][td]portal_url[/td][td]The URL of your site[/td][td]portal_url[/td][/tr]
[tr][td]navigation_root_path[/td][td]Path of the navigation root[/td][td]
[/td][/tr]
[tr][td]navigation_root_url[/td][td]The URL of the navigation root[/td][td]navigation_root_url[/td][/tr]
[tr][td]default_language[/td][td]The default language of the site[/td][td]
[/td][/tr]
[tr][td]language[/td][td]The current language[/td][td]
[/td][/tr]
[tr][td]locale[/td][td]The current locale[/td][td]
[/td][/tr]
[tr][td]is_rtl[/td][td]Whether the site is being viewed in an RTL language[/td][td]isRTL[/td][/tr]
[tr][td]member[/td][td]The current authenticated member[/td][td]member[/td][/tr]
[tr][td]anonymous[/td][td]Whether or not the current visitor is anonymous
[/td][td]isAnon[/td][/tr]
[tr][td]friendly_types[/td][td]Get a list of types that can be deployed by a user[/td][td]
[/td][/tr]
[/table]About the current contextView @@plone_context_state

[table]
[tr][td]Method
[/td][td]what you get
[/td][td]global defines
[/td][/tr]
[tr][td]current_page_url
[/td][td]The URL of the current page
[/td][td]current_page_url
[/td][/tr]
[tr][td]current_base_url
[/td][td]The actual URL of the current page
[/td][td]

[/td][/tr]
[tr][td]canonical_object
[/td][td]The current object itself
[/td][td]

[/td][/tr]
[tr][td]canonical_object_url
[/td][td]The URL of the current object
[/td][td]

[/td][/tr]
[tr][td]view_url
[/td][td]The URL used for viewing the object
[/td][td]

[/td][/tr]
[tr][td]view_template_id
[/td][td]The id of the view template
[/td][td]

[/td][/tr]
[tr][td]is_view_template
[/td][td]True if the current URL refers to the standard view
[/td][td]

[/td][/tr]
[tr][td]object_url
[/td][td]The URL of the current object
[/td][td]

[/td][/tr]
[tr][td]object_title
[/td][td]The 'prettified' title of the current object
[/td][td]

[/td][/tr]
[tr][td]workflow_state
[/td][td]The workflow state of the current object
[/td][td] wf_state
[/td][/tr]
[tr][td]parent
[/td][td]The direct parent of the current object
[/td][td]

[/td][/tr]
[tr][td]folder
[/td][td]The current folder
[/td][td]

[/td][/tr]
[tr][td]is_folderish
[/td][td]True if this is a folderish object
[/td][td] isFolderish
[/td][/tr]
[tr][td]is_structural_folder
[/td][td]True if this is a structural folder
[/td][td] isStructuralFolder
[/td][/tr]
[tr][td]is_default_page
[/td][td]True if this is the default page in a folder
[/td][td]

[/td][/tr]
[tr][td]is_portal_root
[/td][td]True if this is the portal root or the default page in the portal root
[/td][td]

[/td][/tr]
[tr][td]is_editable
[/td][td]True if the current object is editable
[/td][td] is_editable
[/td][/tr]
[tr][td]is_locked
[/td][td]True if the current object is locked
[/td][td]isLocked
[/td][/tr]
[tr][td] actions
(Plone 4)
[/td][td]The filtered actions in the context. You can restrict the actions to just one category.[/td][td] [/td][/tr]
[tr][td] portlet_assignable
(Plone 4)
[/td][td] Whether or not the context is capable of having locally assigned portlets.[/td][td] [/td][/tr]
[/table]Toolsview @@plone_tools

[table=98%]
[tr][td]method
[/td][td]what you get
[/td][td]global defines
[/td][/tr]
[tr][td]actions
[/td][td]The portal actions tool
[/td][td]atool
[/td][/tr]
[tr][td]catalog
[/td][td]The portal_catalog tool
[/td][td]

[/td][/tr]
[tr][td]membership
[/td][td]The portal_membership tool
[/td][td]mtool
[/td][/tr]
[tr][td]properties
[/td][td]The portal_properties tool
[/td][td]

[/td][/tr]
[tr][td]syndication
[/td][td]The portal_syndication tool
[/td][td]syntool
[/td][/tr]
[tr][td]types
[/td][td]The portal_types tool
[/td][td]

[/td][/tr]
[tr][td]url
[/td][td]The portal_url tool
[/td][td]utool
[/td][/tr]
[tr][td]workflow
[/td][td]The portal_workflow tool
[/td][td]wtool
[/td][/tr]
[/table]
设置