1

I've created two taxonomy vocabularies e.g. "One" and "Two" and I've added 5 terms by these vocabularies.

Then I created two taxonomy category template files, but I have one big problem.

Example: term named "Apples" from vocabulary "One" list all nodes that have this term.

I'm trying to get url and node name, trimmed body text and pager so this term page it shows 10 nodes and there is a pager at the bottom.

I created view block, but it's huge job to create blocks for each terms etc..

So how I can list all nodes on these term pages?

0

You are not supposed to create view block for each term, your view can take dynamic argument for taxonomy and will return results accordingly, All you need is to have contextual filter setup for your views.

enter image description here

  • I don't have any view. I have just taxonomy vocabularies and terms. In my custom taxonomy module I've added two custom parent category details page for these parent terms.. So how I can get this nodes to showing these parent term pages? I have parent-term-page.tpl.php for all my terms. How I can add view for there? – Penalse Sep 29 '16 at 20:19
0

If you're looking to build Views for different presentations of term pages or just giving Views control over the page output (and not the core taxonomy module) you might want to give Taxonomy Views Integrator a try.

You would be able to create Views with a term id contextual filter, and then control what the output is. It is fine to have one, or in some cases, you could have a couple depending on use case.

  • Thanks for this module, but it is not exactly what I need. Because I have parent terms tpl file for terms so I need php code to get these nodes listed with pager. Views works nice, but I need to add some extra things in this tpl file. – Penalse Sep 30 '16 at 12:36
  • Really should be using Views to some degree. – Kevin Sep 30 '16 at 12:53
  • But how I can integrated it whit my parent-term.tpl file? – Penalse Sep 30 '16 at 13:14
  • No one knows what or why you have custom tpl files for taxonomy. Views has template overrides. Views provides pagers. It can be setup and done in 5 minutes. – Kevin Sep 30 '16 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.