I have previously added items to the Display Mode option for the Content Listing Mosaic tile, now I am trying to add an item to the Display Mode for the Existing Content Mosaic tile but the process appears to be different and has stumped me.
I registered the template:
<browser:page
for="*"
permission="zope2.View"
name="linked_title_view"
template="templates/existingcontent_linkedtitle_view.pt"
/>
With Content Listing, there was a layer
attribute, but there was no layer interface defined in plone.app.standardtiles.existingcontent.py
. Leaving off the layer
attribute allowed the view to be found.
I also added the view to the registry in my mosaic.xml
file:
<record name="plone.app.standardtiles.content_views">
<field type="plone.registry.field.Dict">
<title>Content Views</title>
<key_type type="plone.registry.field.TextLine" />
<value_type type="plone.registry.field.TextLine" />
</field>
<value purge="true">
<element key="linked_title_view">Linked title view</element>
</value>
</record>
This all resulted in my new "Linked title view" option appearing when configuring the tile but when I select it, it still renders the same way without using my custom template.
I have inspected the code in plone.app.standardtiles.existingcontent.py
, particularly the ExistingContentTile.content_view
method and it returns a SimpleViewClass instance that references my template but again, nothing in my template is rendered.
What am I missing to make this work?