Prototype Layout |
|
Actions |
delete_action action deletes this layout |
download_action download action |
download_full_zip_action create a Zip file containing the whole layout |
download_zip_action create a .zip file containing layout changes only |
edit_action edit action |
main_action main action |
startTestdrive_action action to test-drive this layout in the current session. |
stopTestdrive_action stop a layout test and resume normal browsing. |
Functions |
checkAccess(action, usr, level) permission check (called by hopobject.onRequest()) |
checkEdit(usr, level) check if user is allowed to edit this layout |
constructor(site, title, creator) constructor function for layout objects |
deleteAll() delete all skins and images belonging to this layout |
dumpToZip(z, fullExport) dump a layout object by copying all necessary properties to a transient HopObject and then return the Xml dump of it (this way we avoid any clashes with usernames) |
evalDownload(fullExport) create a .zip file containing the whole layout (including skins, images and properties) |
evalLayout(param, modifier) evaluate submitted form values and update the layout object |
getImage(name, fallback) retrieve an image from ImageMgr this method walks up the hierarchy of layout objects until it finds an image, otherwise returns null |
getNavigationName() Return the name of this layout to be used in the global linkedpath macro |
getParents() walk up all parents and add them to a Hashtable (the key is the layout._id, value is Boolean true |
getSkinPath() walk up the layout hierarchy and add all skinmgr to an array |
getStaticDir(subdir) return the directory where images of this layout are stored |
getStaticPath(subdir) return the path to the static directory of this layout object |
getStaticUrl() return the URL of the directory where images of this layout are located |
isDefaultLayout() Helper function: is this layout the default in the current context? |
setParentLayout(parent) make this layout object a child layout of the one passed as argument and copy the layout-relevant preferences |
staticPath(subdir) render the path to the static directory of this layout object |
staticUrl() render the URL of the directory where images of this layout are located |
Macros |
Layout.activatelink render a link for activating the layout, but only if layout is *not* the currently active layout |
Layout.alinkcolor macro rendering alinkcolor |
Layout.bgcolor macro rendering bgcolor |
Layout.copyright render the copyright information of this layout either as editor or as plain text |
Layout.deletelink render a link for deleting the layout, but only if layout is *not* the currently active layout |
Layout.description render the description of a layout, either as editor or as plain text |
Layout.email render the contact email address of this layout either as editor or as plain text |
Layout.image macro renders an image out of the layout imagepool either as plain image, thumbnail, popup or url param.name can contain a slash indicating that the image belongs to a different site or to root |
Layout.linkcolor macro rendering linkcolor |
Layout.parent render the title of the parent layout |
Layout.shareable render the property "shareable" either as editor (checkbox) or as plain text (editor-mode works only for root-layouts) |
Layout.smallcolor macro rendering smallfont-color |
Layout.smallfont macro rendering smallfont |
Layout.smallsize macro rendering smallfont-size |
Layout.switch overwrite the switch macro in antvillelib for certain properties (but pass others thru) |
Layout.testdrivelink render a link to testdrive if the layout is *not* the currently active layout |
Layout.textcolor macro rendering textcolor |
Layout.textfont macro rendering textfont |
Layout.textsize macro rendering textsize |
Layout.title renders the layout title as editor |
Layout.titlecolor macro rendering titlecolor |
Layout.titlefont macro rendering titlefont |
Layout.titlesize macro rendering titlesize |
Layout.vlinkcolor macro rendering vlinkcolor |
Skins |
chooserlistitem.skin |
download.skin response.action |
edit.skin response.action |
main.skin |
mgrlistitem.skin |
testdrive.skin |
type.properties |
_db = antville _table = AV_LAYOUT _id = LAYOUT_ID _parent = site.layouts, root.layouts ## ## primitive properties ## alias = LAYOUT_ALIAS title = LAYOUT_TITLE description = LAYOUT_DESCRIPTION createtime = LAYOUT_CREATETIME modifytime = LAYOUT_MODIFYTIME shareable = LAYOUT_SHAREABLE imported = LAYOUT_ISIMPORT ## ## xml encoded properties ## preferences = mountpoint(PropertyMgr) preferences_xml = LAYOUT_PREFERENCES ## ## object references ## site = object(Site) site.local = LAYOUT_F_SITE site.foreign = SITE_ID parent = object(Layout) parent.local = LAYOUT_F_LAYOUT_PARENT parent.foreign = LAYOUT_ID creator = object(User) creator.local = LAYOUT_F_USER_CREATOR creator.foreign = USER_ID modifier = object(User) modifier.local = LAYOUT_F_USER_MODIFIER modifier.foreign = USER_ID ## ## mountpoints ## skins = mountpoint(SkinMgr) images = mountpoint(LayoutImageMgr) ## ## collections ## sharedBy = collection(Layout) sharedBy.local = LAYOUT_ID sharedBy.foreign = LAYOUT_F_LAYOUT_PARENT |