Taxonomy page - enabled views

hello.

One thing, when I click on taxonomy link from my page, it takes me to a page where all the items with the same taxonomy term are listed.
But in option “View mode” I get all the possible views from the fall down menu, although I disabled most of the views on my collection settings page. Can I change that, and make it to display items in default view)? I would like to set LIST as default view mode.
Thx.

This is link:

(View mode is translated as PRIKAZ)

tnx

I think I’ve found the default view option (TAINACAN TERMS ITEMS → SEARCH CONTROL).

But how to disable other view modes that I do not need, this is the only place where all view modes are displayed, strange).

And, if it is possible (via css) I would like to remove the filename (title) displaye in that LIST MODE. I defined that TITLE is private and not displayed anytime, but here it is displayed all the time :slight_smile:

Hi @Vedran_Serbu!

When visiting a Taxonomy page, your Collection-level settings are not considered, since this is a repository-level page (because Taxonomies can be shared between multiple collections). View modes are the case as well, and the title situation is a bit more critic, because here it is looking a the title from the repository perspective (the core title is an information that all collections have), not taking into account if they are to be hidden or not.

While we could hack things a bit and offer more options, I would ask if the following could solve your situation:

  • In the taxonomy metadata settings, you can enable an option that “Links the term value to filtered collection”. This way, instead of falling into the Taxonomy page when clicking on a certain term, you would go to the Collection page, where all your settings are respected, pre-filtered by that term of that collection.

Otherwise the solution for hidding the title would be CSS and for disabling the view modes would require code since we still don’t have a place for that.

Finally, I would strongly argue against having Title as private metadata. It is the most important identifier that appears in several places on the UI. If you can explain to me the decision I can suggest another direction, but it doesn’t seem a good idea in my opinion.

I did that - enabled “Links the term value to filtered collection”. And before that , I set Title as public metadata, thanx for the warning (I just wanted to hide title, because title is usefull for me for order by and such things, but it is better not to be seen)

Unfortunatley, I still have the same result, still have all view modes to choose and the title is there.

What am I doing wrong? Tnx.

How are you reaching this term page? Because the option would only affect links that are presented in the item metadata. The taxonomy page that you access from the admin remains existing, as other collections could use them without that setting enabled.

you can check it here:

It is our standard item page, and it has some metadata, and two taxonomy terms

  1. NAZIV SERIJE I PODSERIJE (the name of the series )
  2. IZDAVAČ / NAKLADNIK (publisher)

Both taxonomy are presented on that page as links. When I click on that link, it gives me other items with the same taxonomy value, and opens a web page which I can only partially control. I would like for results to be presented as LISTS (I can set it at Tainacan Terms Items but I can not remove title (in my case it is the name of the file) and limit view modes only to be LISTS and MASONRY.).

I apologize for the salvo of questionsi in last few days, I hope eveyithing is going to end when the project is officially made public (01.02.2024).

No problem, we’ll find a way before the release. What you are looking for should be achievable via the metadata setting that we are talking about, but for some reason it is not… can you share me a screenshot of how the settings are on your side? I’ll do some tests in my local to see if I can reproduce a bug…

IT-IS a bug! I’ll take a look as soon as I can.

Plot twist @Vedran_Serbu, it is NOT A BUG.

The current behavior is the expected, I was just misinterpreting the feature. As you can see you can select multiple collections there, so the idea isn’t that links should go to the Collection items list, but to remain going to the Term items list, this time filtered only by a set of collections.

What you are requiring really concerns to adding more customization to Term Items list options, something that, as mentioned in the issue 355, we still don’t have a proper place for. Ideally, I would offer this as another option in the theme settings, but this is something we are not able to focus right now.

To help you deliver what you need, I can give you a path that will require code, but at least uses existing developer solutions. You’ll have to, either in a plugin or child theme, add this chunk of code:

add_filter(
    'tainacan-enabled-view-modes-for-themes',
    function( $enabled_view_modes ) {
      $enabled_view_modes = array_diff( $enabled_view_modes, [ 'cards', 'table', 'map' ] );
      return $enabled_view_modes;
    }, 
10, 1);

As you can see, this uses one of our filters that completely disables from the theme-side the ‘cards’, ‘table’ and ‘map’ view modes.

Regarding the title… The way to go now is to hide it via CSS:

.theme-items-list #items-list-area #items-list-results .tainacan-list-container .tainacan-list .metadata-title p,
.theme-items-list #items-list-area #items-list-results .tainacan-masonry-container .tainacan-masonry-item .metadata-title p {
    display: none;
    visibility: hidden;
}

Tnx so much! The part with CSS is working, but I have never used a code directly into theme or plugin. Is it maybe possible to hide it all together like that title with CSS (because I really do not need for user to change default view mode I defined). If it is possible, of course. Tnx again!

It is a bit less secure because there is no css identifier bound to the view mode type, so you would have to do it based on position…

#tainacanViewModesSection .dropdown-item:nth-child(1),
#tainacanViewModesSection .dropdown-item:nth-child(2),
#tainacanViewModesSection .dropdown-item:nth-child(3),
#tainacanViewModesSection .dropdown-item:nth-child(5),
#tainacanViewModesSection .dropdown-item:nth-child(6) {
  display: none !important;
  visibility: hidden;
}

But I don’t like this because you can still change the URL or maybe this order gets messed up if you disable and re-enable view modes… the php code above is more radical, it ignores view modes completely.

One suggestion: if you are not using any of the view modes registered by the Extra View Modes plugin, please disable it. It loads unecessary CSS and Javascript.

Thnx for the tip, I disabled extra views.

About the first option (php), just to copy/paste in in child theme functions.php? (via theme editor)?

Yes, if you are using a child theme. If you are using Blocksy’s directly then best way would be either in a plugin code or move to child theme because future updates would override your code. There is also this plugin:

Which allows you to input code like that and test enabling/editing it.

1 curtida

Perfect! Thank you so much - again! :+1:

1 curtida