Drupal 9 Views contextual filter based on current nodes' taxonomy term - view

A content type "landscape" with a taxonomy reference field to "location" vocabulary.
A "landscape node listing" Views block displayed on "landscape" page.
I want this block to display only the "landscape" nodes whom "location" term is same than the current node.
e.g. /node/6 has the location term "North island" : the Views block displays only the nodes having "North island" term referenced.
In this Views block I added
A relationship "Taxonomy terms on node" + vocabulary checked + require this relationship,
A contextual filter " Taxonomy term: Name" based on "Taxonomy terms on node" relationship.
I tried several way to configure "When the filter value is NOT available" and "When the filter value IS available or a default is provided" but none of these configurations worked
Any help ?

To create a Drupal 9 Views contextual filter based on the current node's taxonomy term, follow these steps:
Create a new view or edit an existing view.
Add a new display, and choose the type of display as "Block".
Add the fields that you want to display in the block.
Under the "Advanced" section, click on "Contextual filters".
Add a new contextual filter and choose "Content: Has taxonomy term ID".
Choose "Provide default value" and select "Taxonomy term ID from URL".
Save the view.
Now, when you visit a node page, the block will display the content that has the same taxonomy term as the current node.

Related

magento 1.8 search results filter contains all attributes

On each category page, filter work correctly (can chose only parameters from products which apply to this category), but in search result page - filter consist of all attributes.
Please help me to fix problem with filter on search result page.
"Search result page - filter consist of all attributes."
I think you are referring to the "Layered Navigation" on the search results page.
You can specify which attributes appear on the search results page under the attribute settings;
Catalog -> Attributes -> Manage Attributes.
Select the attribute (filter) you wish to display or remove.
Now under "Frontend Properties" you will see the option "Use In Search Results Layered Navigation"
Adjust this value according to your requirements.

Order articles in joomla

I'm trying to order some articles from a category in joomla at this url:
http://www.dasphotonics.com/apps/joomla/en/products/electronic-intelligence-and-radar
After put the order at the administration panel, optical harmessing I have it on the fourth place but it appears at the 3rd place, why?.
Regards and thank you
The reason is that Joomla doesn't order the articles by the backend ordering by default.
There are two ways to change this.
Do this ordering Global
Set the ordering method in the Menu
The first one could be changed in the Article List->Options (Top Left Button)->Shared Options (Tab)->Article Order (Drop Down) - Change this to Ordering. This will change all Blog and Category views to this type of ordering.
The second option is in the Menuitem. On the right site you have a Slider called "Blog Layout" there is a Option "Article Order" change this to "Article Manager Order". This will change only this Blog or Category view to this type of ordering.

I want to create a category just to show products in a particular attribute

Hope you can help Magento users,
I have a clothing store selling big mens clothing. One of my best categories in my old store was allowing the customer to view all the products in his size in one feed. Whilst I am aware they can choose the top level category (menswear) and use the attributes down the left side to select their own size, I would like to have a specific category for instance (All 3xl products) all ready setup in the mega menu. So far I have been able to set a category up and set a url rewrite to the required url attribute. Works fine but I can not add text at the top of the page (for seo purposes).
I was considering if it is possible to create a static block with only 3xl products in, then I can design the page around the static block?
Depending upon category structure if you are using anchor categories you could create a link directly to an attribute filter.
i.e
I have an attribute called material
and the value of polycarbonate id is "4"
you can append the values of layered navigation/anchor categories to the end of the url
mysite.com/vehicles.html?material=4
Say for example, you have an attribute of "size", with the id of 3xl = "10"
and mens was your anchor category. It would look like
yoursite.com/mens.html?size=10
Then you would just create a simple html link to http://yoursite.com/mens.html?size=10

Term Added in Taxonomy not available for selection when creating a new product

I added a term to a taxonomy list. The taxonomy list is entitled "In Stock Colors" and I added "Gray" to that list.
I need that option to be available when I am creating a new product, so that when I add the product to the Magento catalog, I can select "Gray" as an available In Stock Color.
However, although the term displays in the taxonomy list, it does not display when attempting to create a new product.
How can I make sure that Gray shows up as an available in stock color when adding a new product?
There could be a number of reasons why it won't show up for that product. The primary things to look at are:
Make sure the given category is a sub category under the root
category for that particular store
make sure the "Is Active" flag for the category is set to "Yes"
Flush the cache, the new category might not be cached yet
If that doesn't work re-index the categories

Drupal 7, taxonomy exposed filter

I am working with drupal 7. How do I limit a taxonomy dropdown exposed filter to only display the terms used by nodes in view results?
I understand that the list is populated before the views takes place, but this means that i am often left with tags that display nothing ( since they are hidden with my view) any help would be much appreciated
In views:
Filter Criteria
Add - Content: Has taxonomy terms
Settings: Select the Vocabulary name.
Checkbox Expose this filter to visitors.
If you are using single filter select that, where you can see the list of Taxonomy terms. If you have child terms select hierarchy check box and specify the depth of it. only appears when you Add - Content: Has taxonomy terms (with Depth) -- refer to second step above.
Now select the terms you want to display, and make sure to checkbox Limit list to selected items
You can also add (Global: text area) under No result behavior in Advanced if you still want to show all taxonomy terms but want to show some thing to user like coming soon instead of leaving the selected taxonomy term showing empty page.

Resources