Collective.collectionfilter Mosaic: to do

I might be able to help with (fixing) Mosaic tiles, but I don't know what the following means.
So if someone could explain what I 'should do', it would be nice.

TODO: right now the collection needs a default_view template, which wraps the result list with a unique selector inside the #content-core container. so the collectionfilter can load the filtered result correctly from the collection into the container inside the existing content tile.

/cc @petschki

There is a current PR which targets this problem. See target contentlistingtiles or collections by djay · Pull Request #133 · collective/collective.collectionfilter · GitHub

This may be beyond the scope of collectionfilter by using contentlisting tiles as the target collection, but I like the concept behind it …

BTW this is the current state of using collectionfilter on mosaic. Simply activate „use content query“ on contentlisting tiles on a collection mosaic in combination with filtertiles. @agitator and me are using this approach a lot

What it means is still confusing. for a start it only applies if you are using ajax loading which is not clear from either the documentation or UI and what it's refering to is using the embed tile as a way to create a kind of fake listing on the current page which then gets replaced by the view a collection. I mean fake because the initial listing will come via the embed tile and subsequent ones will come be reloaded by directly accessing the collection view rather than the embed tile which can create weird side effects.

Subsequently contentlisting tile was fixed to allow request overrides queries which made it possible to use filters with it instead of the embed tile.

All my current PR does is remove the need for the new confusing "use content query" feature on contentlisting tiles and lets them be used directly with no need for a collection. It also fixes the missing tests for tiles.

One more thing thats really not clear is what the behavior should be when you have a portlet or tile that is on a descendent of collection or contentlistingtile. There needs to be tests for this.

I will look further into this later.

Just want to tell that I discovered that having an empty tile with just <div id="content-core"> </div> works as a search (so it starts out empty and fills with content 'when you search.'

In fact: if it was used as a search, it would be nice if it was possible to turn off 'live search', so one actually needed to press 'search' to get the result. I don't know if this is currently possible.

For a short time, the test I did will be here: My page — Plone site

Do you have an url (of a site where it is done like this) ?

Just a quick clarification: there is no embedding anywhere of a "fake" collection listing into the contentlistingtile and it works with and without ajax ... the only reason whe implemented the "use context query" feature is, because collective.collectionfilter is (as its name says) a filter tool for collections and has an adapter which injects the filter query into the request. Unfortunately the contentlisting tile did not recognize any request params so we've implemented that sice and added a feature to use the query from the context (which should be a Collection ... read on)

Another reason your context should be a collection when you use filtering on mosaic is due to the URL rewriting (when using AJAX) and redirecting (without AJAX) to the selected target collection. So if your filter tiles have a target collection somewhere else than your context, your url gets rewritten/redirected to this collection url and you're gone from your mosaic page. Thats the reason why since version 3.5 you do not need to select a target collection for your filter tiles/portlets. It just uses the context as default.

thats the current state of mosaic collection filtering. :sunglasses:

besides all that I like the approach of @djay which indeed makes it obsolete to create a collection for mosaic filtering. But we should be aware that the package name doesn't give a hint about contentlisting tile filtering at all and it should be well documented somewhere.

Kunstvoll gestaltete Karten und Kartensets online kaufen | FOTOEIGENART (german only)

What is the usecase for setting a different target collection?

I was refering to the way the "existing content tile" was previous recommended as a way to use filters on a mosaic page. This was that the ajax refresh seemed to be getting the view of the actual collection rather than that generated by the embed tile and placing it where the embed tile was. or at least when I tried it that what seemed to be happening.

Should be made clear in the UI not just the readme. I've started work on a PR with some ideas of how to make the UI clearer - Simplify Names and UI by djay · Pull Request #135 · collective/collective.collectionfilter · GitHub

I am a bit uncertain about how to use this.

It looks to me like I don't have any #content-core to use as a selector. Is there something else I can use ( using #content will filter, but remove the 'filter tiles' as well)

if using a content listing tile then the selector should be ".contentlisting-tile".
It needs to be made to default to this in this case.

Thanks. (I actually tried that, but I (now) found out that my 'main idea' about this just does not work.

What I wanted (most) was a Mosaic tile, or better, a theme fragment that could be used on the collection and also on the results. I tried to look at what exactly is the differences between a view and tile, maybe I have to use the folder listing macro in the view.

That has to wait to after the football matches, though :slight_smile:

So I assume I am looking for

'How to get my own views available in "Display mode".
Would it be enough to make a new (collection) view and then register it from a profile ?

@petschki @djay

So I made a new collection view

Question: Is there any reason why not the default view of a collection could be one of the options in 'Contentlisting Tile' ?

PS: I dont think it is possible to add it TTW (you just are 'redirected' to the configuration registry control panel)

if I understand you correctly you are saying to turn the collection view into a drop down with options taken from portal_types? or just change the default at the time you create the tile/portlet?
if it's changing the default perhaps its better to have the default be blank and have it lookup the default view dynamically?

Something like that, yes.

That said: I did try quite a bit to get this to work, without success.
I can't remember the errors I got, but 'normal views for Collections' did not work.