I swear Drupal is doing my head in. Once you’ve twigged something its obvious. Its the twigging thats the trouble! Site content is tagged ie given a taxonomy. The intention is to:-
- display a page that shows content with a specific tag e.g. all content with the ‘drupal’ tag
- intercept some of those pages to change their layout i.e. so there is a special drupal page
The first goal is solved with the provided taxonomy_term view. It pretty much works out the box.
- Goto Administer>Site Building>Views, enable taxonomy_term.
- Edit that views defaults > arguments > taxonomy: Term ID to have the argument as a “term name converted…”. This means when we use a url of /taxonomy/term/drupal we will fetch all content tagged ‘drupal’ .
Once saved the view is available and you will see a list of content matching any term you offer after /taxonomy/term/…
For the second part we want to have a better layout than that just a list. For this we use Panels,
- Goto Administer>Panels>Panel pages and create a new layout that intercepts /taxonomy/term/drupal.
- Make settings > path be the url you want to intercept e.g. /taxonomy/term/drupal.
- Once thats done layout the page adding in the taxonomy_term view:page sorted above and whatever other views you like.
Now the url /taxonomy/term/drupal comes to this new panel layout. A note: if the panels path is /taxonomy/term/drupal then when adding the taxonomy_term view the “arguments” field is %2 (%0=taxonomy, %1=term) , so the string ‘drupal’ is sent into the taxonomy_term view above. But since we are creating this panel to intercept just pages tagged drupal, then we can simply pass the word ‘drupal’ instead of %2
Seems to all work but a bit of a faff.