Display related dexterity content types with eea.facetednavigation - plone

I have a site that has uses dexterity with plone.app.relationfield.behavior.IRelatedItems and eea.facetednavigation. I can't seem to query for related items. The related_to index that eea.facetednavigation uses is the Archetypes getRawRelated index, which isn't populated by dexterity. Is there an obvious way to query for related dexterity types with eea.facetednavigation that I'm missing? I checked out eea.relations, but while that allowed me to define relations, I still couldn't figure out how to query for and return the related items.

Related

Relating different content types in Drupal 7

I've just started learning Drupal 7 and I'm stuck on a problem.
I want to relate different content types using taxonomy. For example, how can I display blogs related to an article?
I know how to relate articles and basic pages but I don't know how can I relate blogs with articles?
Please help me.
Use reference field in blogs content type
like
field name is: related with
field type is reference
set reference type node
set node type is article
optional multivalued true
Now you have a relationship field in blogs
Now you can do every thing with this relationship
Hope this make sense
Thanks
You would create your taxonomy vocabulary and supply it with terms. On its own, this doesn't do anything, you need to add a field to each of your content types that are using this taxonomy.
If you go back to your content types, structure > content type > article. Here you would create a new field of type term reference. Inside the settings of the field you'd select your vocabulary and then also the widget eg. select list. You can re-use this field on the other content types where you want to share this vocabulary.
If you go back to your content for the types you added this field for and populate them with selections, when you view that page by default the term will appear as a link. If you click this link it will take you to a page view that will list all the other nodes that have that term form that vocabulary.
More information on taxonomies: https://www.drupal.org/docs/7/organizing-content-with-taxonomies/about-taxonomies
If you are creating a view and want to know how to pull in different tagged content there, I'd recommend reading this post which outlines the steps to do so https://drupal.stackexchange.com/questions/205921/how-do-i-show-related-content
The process:
Basic stages:
Create a “Content” view-block.
Add a contextual filter: “Has taxonomy term ID”.
Choose “provide a fixed value”.
(From type): “Taxonomy term ID from URL“.
Checking:
• Uncheck “Load default filter from the term page”. • Check “Load
default filter from node page, that’s good for related taxonomy
blocks”.
• Check “Limit terms by a vocabulary”. • Check your desired
vocabulary.
Select “Filter to items that share any term”.
Go down and check “Reduce duplicates”: This will several terms that relate to the same page – To appear. Only one will of them will.

How to add collective.taxonomy taxonomy to SearchableText index?

I'm using collective.taxonomy and I have a taxonomy called taxonomy_themes.
I use it with it's behavior in my dexterity content type.
There is allready a index called taxonomy_themes, but I need that this field to be searchable via the SearchableText index.
I've read a lot about collective.dexteritytextindexer but I can't made it work with the taxonomy.

Tweaking Plone Dexterity Container View

I have a custom plone dexterity content type which is a container of other dexterity types. I have added an additional view to recursively summarize the contents of this type.
I'm needing anonymous users to be able to navigate to the default view like normal, but then also be presented with a link to this summary view. I do not wish to rewrite the default view from scratch, but just add a simple hyperlink to it. I have read the dexterity manual, but I cannot seem to make the leap to how to pull off something like what I'm trying to do.
Any recommendations?

how to add an additional view to the display menu for allI DexterityContent types

I have created a view that is available to all IDexterityContent types via ##myview.
But I also would like to add it to the display menu of IDexterityContent types.
Update:
To be more precise I'd like TTW create dexterity types to have this view available in the display menu.
The available views for a content which support dynamic views option are stored in the site database, portal_factory
https://docs.plone.org/develop/plone/content/dynamic_views.html
If you want to add support for multiple views I suggest you create an installer Python snippet which will iterate portal_factory for available types and modifies their view_methods attribute.
https://docs.plone.org/develop/plone/content/types.html#type-information-registry
https://docs.plone.org/develop/addons/components/genericsetup.html#custom-installer-code-setuphandlers-py

How to expose views filter on nodereference cck field on node create

I am looking for a way to utilize an exposed views filter for a cck node reference field. I have tried a couple of items that just don't seem to cut or I have not been able to configure them.
The goal would be when creating a page the nodereference field would not be a select field with hundreds of options, but would be an exposed filter view for a particular content type. The exposed filter would allow you to filter by title or by a content taxonomy field.
I have tried nodereference explorer which could work but I have found it to be pretty buggy for a production site.
I have also tried nodereference view select, which appears to work differently for D6 than in D5.
It could be that I have the right elements but have yet to get them integrated successfully.

Resources