hyc wrote:1) have possibility to add different tags (dimensions of the underlying object, example if it is a painting of 60x120cm, or the type example canvas or acrylic, the price etc, these are proper to my usage but you get the idea, and other types not necessarly displayed but to be considered as "data-" in the html, example data-tag)
Yes. Surely these items could be added as TAGS though and not separate attributes, because that's after all exactly what TAGS would be created for, to filter files based on search and or predefined filter-by-tag buttons. Just adding additional custom attributes would require panel settings to to add them, store them, and unlike with "tags", I can't build anything useful from this by default in X3.
hyc wrote:2) have filters for data-tag like above example. Then I can add some html/js code in the x3 page description to apply filter based on data-tag to hide/show content, and why not filters on the other tags (i want to see only the canvas, or the price below X eur, but i understand this is an extra step)
Yep, although as mentioned, I don't see why this needs to be complicated with tags AND custom attributes. Maybe for a quick hack, but not for a refined built-in solution.
hyc wrote:3) add in description PayPal links or any sort of buying link
You can already do this, by appending paypal buy buttons to all image descriptions in a folder. I don't see why this has to be a separate custom attribute.
hyc wrote:As for the tag filters, i am wondering if maybe i can do something in the meantime by using the image parameters (equivalent to point 1) ?
I tried adding "source_id=nature" but I wasnt able to find out how to use source_id...(that would have been perfect to do point 2)
I think we need to separate between requests for future feature with built-in mechanisms for TAGS / filtering by TAGS, and "something you can do it the meantime". With the latter, I assume you are experienced with Javascript and have the idea to build a custom filter mechanism on the page. Image paths and descriptions are already stored inside the element that represents each image, and could then be searched with some filter lookup. Sounds very complicated to me to create this from scratch though. Besides, you can't just "filter" live with all X3 layouts ... for example, the "justified" layout is built from Javascript and would need to be manually refreshed if the layout changes (on filter).
I don't think you would use "parameters", because this was only added for panorama plugin initially. Besides, even if you get something like data-params="option1=AAA&option2=BBB", that's one big job you have to create an effective, searchable, filterable layout from that.
hyc wrote:is there anyway to have a parameter that would appear as a "data-" in the html (and ideally as well to add any custom parameter ?). that way i could probably use something like that
https://codepen.io/shakhzodtojiyev/pen/PoNyRQg to filter.
There is data-title and data-description, and you could do partial matches. But then again, perhaps things you don't think about:
- What happens when visitor clicks to view an image in popup? The non-visible images are not excluded from the popup slideshow just because they have been hidden. This requires proper implementation logic, not just show/hide by CSS.
- X3 layouts are created by Javascript. You can't just hide elements and expect the browser to naturally adjust the layout. In your link, it's just a simple layout, and you can see gaps between the vertical images.
- In the example above, it just filters by data-item="" and that's it. In your case, you want to sort by multiple attributes.
I already have some modern version of filter/tags in our new files app:
https://demo.files.gallery/?balloons
Although there are no "tags" to be clicked, it's essentially the same although there is no logic in pre-adding tags up front for this app. For example, search "landscape" and it will show only landscape images (and it could have been a button-tag if I wanted to). It was a lot of work, and only works properly because the layouts use modern CSS instead of JS, and from filtering by full JSON object properties (like a browser-database). It also actually removes/adds the elements dynamically into browser, so that we have a real view of matching items, not just hidden with CSS. And this allows it to work with the popup.
I could probably go on, but I think you get the idea. Not trying to put you off or anything, but these are the things you will have to deal with, and I have already been there. This is X4 material. If you want to implement something in X3, you will be struggling with a lot of hacks.