Hi,
I’m trying to create a new plone template following these instructions: https://training.plone.org/5/theming/creating-customizing-templates.html#creating-a-new-plone-template. I’m getting an error on the line <div tal:repeat="item context/values"
. If I understand this correctly this mean that it’s trying to iterate through a collection, context/values, and assign each member to a temporary value “item”. It seems to be having trouble with “context/values”, but I’m not sure what context
collection is.
I should note that this is from the official Plone vagrant box and I have customized it very little, save for creating a theme, also from the official docs (https://training.plone.org/5/theming/theme-package.html), which worked well. Almost all configuration changes that were recommended in the training were already there. Also I used the slider-images.pt
file that already existed in themes/views, it just needed to be renamed. This is the first error I've encountered.
Thanks,
Gene
Full error:
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Products.Five.browser.metaconfigure, line 485, in __call__
Module Products.Five.browser.pagetemplatefile, line 125, in __call__
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module five.pt.engine, line 98, in __call__
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module d12f611b9ab9456774890d203c35ae39.py, line 120, in render
Module five.pt.expressions, line 154, in __call__
Module five.pt.expressions, line 126, in traverse
Module zope.traversing.adapters, line 136, in traversePathElement
__traceback_info__: (<Products.Five.metaclass.SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt object at 0xb1d3d6cc>, 'values')
Module zope.traversing.adapters, line 50, in traverse
__traceback_info__: (<Products.Five.metaclass.SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt object at 0xb1d3d6cc>, 'values', ())
LocationError: (<Products.Five.metaclass.SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt object at 0xb1d3d6cc>, 'values')
- Expression: "context/values"
- Filename: ... .tango/src/plonetheme/tango/theme/views/slider-images.pt
- Location: (line 4: col 26)
- Source: <li tal:repeat="item context/values"
^^^^^^^^^^^^^^
- Arguments: repeat: {...} (0)
template: <ViewPageTemplateFile - at 0xb36b17ccL>
views: <ViewMapper - at 0xb1d1f40cL>
modules: <instance - at 0xb633f56cL>
args: <tuple - at 0xb747402cL>
here: <SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt slider-images at 0xb1d3d6ccL>
user: <ImplicitAcquisitionWrapper - at 0xb358a324L>
nothing: <NoneType - at 0x83132e4>
container: <SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt slider-images at 0xb1d3d6ccL>
request: <instance - at 0xb1d1566cL>
wrapped_repeat: <SafeMapping - at 0xb353593cL>
traverse_subpath: <list - at 0xb1d8f8ccL>
default: <object - at 0xb749aa18L>
loop: {...} (0)
context: <SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt slider-images at 0xb1d3d6ccL>
view: <SimpleViewClass from /vagrant/plone/src/plonetheme.tango/src/plonetheme/tango/theme/views/slider-images.pt slider-images at 0xb1d3d26cL>
translate: <function translate at 0xb316ccdcL>
root: <ImplicitAcquisitionWrapper Zope at 0xb43a2cacL>
options: {...} (0)
target_language: <NoneType - at 0x83132e4>