{ "info": { "author": "UNKNOWN", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Zope3", "License :: OSI Approved :: Zope Public License", "Programming Language :: Python" ], "description": "MEGROK PAGELET\r\n==============\r\n\r\nThis package try to bring the functionality of z3c.template and\r\nz3c.pagelet to grok.\r\n \r\nz3c.template gives us a alternative for the zpt:metal layout based system in grok.\r\nThe z3c.pagelet has the advantage that it\u00b4s possible to register layouts with\r\nhelp of\r\nthe zope-component-architecuture this allows us to change or modify layouts \r\nwithout touching the *master* macro.\r\n\r\nThis means you have megrok.pagelet.Layout component which holds\r\nthe layout. Instead of using grok.View you have to take \r\nmegrok.pagelet.Pagelet for normal BrowserViews.\r\n\r\nIf you need more information about z3c.template please look here [1].\r\n\r\nThe Layout\r\n----------\r\n\r\nThe first thing we have to do is set up a layout for our pagelet.\r\n\r\nclass MyLayout(megrok.pagelet.Layout):\r\n grok.context()\r\n grok.layer()\r\n\r\n megrok.pagelet.template('my_layout_template.pt')\r\n\r\nThis configures the template ('my_layout_template.pt') as a layout for the given\r\ncontext and layer. Of course it\u00b4s possible to specify different \r\nlayouts for different layers or contexts.\r\n\r\n\r\nIn the content of my_layout_template.pt is something like this:\r\n\r\n\r\n \r\n
\r\n here comes the content\r\n
\r\n \r\n\r\n\r\nThe Pagelt (View)\r\n-----------------\r\n\r\nOk instead of using the common grok.View for our BrowserViews we use now\r\nmegrok.pagelet.Paglet. This component has one difference to a normal\r\ngrok.View. This difference is in the __call__ method of the megrok.pagelet.Pagelet.\r\nThis means that the __call__ method of a Pagelet does not only return the renderd \r\n\"template\" of the Pagelet. The __call__ first search for the layout in given context\r\nand layer and then it renders the \"template\" in this layout.\r\n\r\nclass View(megrok.pagelet.Pagelet)\r\n grok.context()\r\n grok.layer()\r\n grok.name()\r\n\r\n def render(self)\r\n\treturn \"...\"\r\n\r\n\r\nNow if you point your browser on .../view you sould see the renderd view in the\r\ngiven layout.\r\n\r\n[1] http://pypi.python.org/pypi/z3c.template/1.1.0\r\n\r\n\r\ntrunk (2009-03-24)\r\n==================\r\n\r\n - xxx \r\n\r\n0.1 (2009-03-24)\r\n------------------\r\n\r\nInitial release as egg.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/megrok.pagelet", "keywords": "", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "megrok.pagelet", "package_url": "https://pypi.org/project/megrok.pagelet/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/megrok.pagelet/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/megrok.pagelet" }, "release_url": "https://pypi.org/project/megrok.pagelet/0.1/", "requires_dist": null, "requires_python": null, "summary": "z3c.template / z3c.layout support for Grok", "version": "0.1" }, "last_serial": 794648, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "72f051f6a64fc5c8c894ceeed7c985f4", "sha256": "021c2610be00fdfd1d2933a43b98cdd32c3b89a3b7f57e94250be989e8d90d0e" }, "downloads": -1, "filename": "megrok.pagelet-0.1.tar.gz", "has_sig": false, "md5_digest": "72f051f6a64fc5c8c894ceeed7c985f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8970, "upload_time": "2009-03-24T09:38:49", "url": "https://files.pythonhosted.org/packages/99/c2/68ee15fcb6b5852ce98b72629cb19d89c7ddfc5cf9bb426d4f478c1ad1a7/megrok.pagelet-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "72f051f6a64fc5c8c894ceeed7c985f4", "sha256": "021c2610be00fdfd1d2933a43b98cdd32c3b89a3b7f57e94250be989e8d90d0e" }, "downloads": -1, "filename": "megrok.pagelet-0.1.tar.gz", "has_sig": false, "md5_digest": "72f051f6a64fc5c8c894ceeed7c985f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8970, "upload_time": "2009-03-24T09:38:49", "url": "https://files.pythonhosted.org/packages/99/c2/68ee15fcb6b5852ce98b72629cb19d89c7ddfc5cf9bb426d4f478c1ad1a7/megrok.pagelet-0.1.tar.gz" } ] }