Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override block content listing in mosaic #416

Open
pablovg2 opened this issue Aug 13, 2018 · 4 comments
Open

Override block content listing in mosaic #416

pablovg2 opened this issue Aug 13, 2018 · 4 comments

Comments

@pablovg2
Copy link

Hi,
I am looking for how can I do an override of a block sumary list in mosaic.

I have searched and I read all the documentation about override a view page in https://training.plone.org/5/mastering-plone/zpt_2.html#the-summary-view but it only work in a page view.

Is there a way to do the same in the block content listing in mosaic?

Regards

@datakurre
Copy link
Member

I assume it is possible with filename plone.app.standardtiles.templates.summary_view.pt and by copying the original from

https://github.com/plone/plone.app.standardtiles/blob/master/plone/app/standardtiles/templates/summary_view.pt

It is also possible register more views for the tile with view registration

https://github.com/plone/plone.app.standardtiles/blob/master/plone/app/standardtiles/content.zcml#L160

and appending view name to registry

https://github.com/plone/plone.app.standardtiles/blob/master/plone/app/standardtiles/profiles/default/registry.xml#L59

It is unfortunate that this is not documented.

@pablovg2
Copy link
Author

Thanks datakurre,

I am trying with these file in the browser directory but I can't make it works..

Inside: browser/overrides/
file name: plone.app.standardtiles.templates.summary_view.pt
content the same as (link) with some changes to see the override.

I don't test it the other way by now.

@datakurre
Copy link
Member

datakurre commented Aug 14, 2018

@pablovg2 I'm surprised that it doesn't work, because there should not be anything special for that approach.

An alternative that I seem to be using myself:

<browser:page
    name="summary_view"
    for="plone.app.contentlisting.contentlisting.ContentListing"
    layer="plone.app.standardtiles.contentlisting.IContentListingTileLayer"
    permission="zope2.View"
    template="path/to/summary_view.pt"
    />

This is technically "more exact" registration to the default registration in plone.app.standardtiles, and that make it "override" the default.

@pablovg2
Copy link
Author

Oh great, it works now with this configuration.

thanks

krissik pushed a commit that referenced this issue Mar 11, 2024
[pre-commit.ci] pre-commit autoupdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants