How to display views'title with content_taxonomy field passed as argument

anrikun - September 15, 2009 - 14:21
Project:Content Taxonomy
Version:6.x-1.0-rc2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

My view accept a content_taxonomy term as argument.
The value used as the argument is the term id.

Then, my view's title is "My View %1"
The problem is that this displays "My View 123": the term id is displayed and I want term's text instead.

Is there a way to do so?

#1

mas160 - October 7, 2009 - 12:39

If you set title as "My View %term" should do the trick.

#2

anrikun - October 7, 2009 - 17:07

No it doesn't work :-(
The field expects arguments like %1 %2 ou %3:

Configure Argument ...

Title:
The title to use when this argument is present. It will override the title of the view and titles from previous arguments. You can use percent substitution here to replace with argument titles. Use "%1" for the first argument, "%2" for the second, etc.

#3

mas160 - October 8, 2009 - 08:33

You're right, %term won't work, BUT: I tried to set a personalized title and given %1 argument is TID of term and title is defined "MyView %1" pointing to / I see on page title "MyView ", not TID...

Wich version of views are you using? I tested this on 6.x-2.6.
Further I think this is a Views issue, not taxonomy.

#4

anrikun - October 8, 2009 - 21:51

I'm using 6.x-2.6 too.
Sorry but I didn't really understand your last reply.

Let's consider that:
- my view accepts a Content Taxonomy term ID as argument
- my view path is myview/%1
- my view's title is set as "My View %1"
- one term is "fruit" and fruit's TID is 123

When I access page "view/123", I would like that "My View fruit" is displayed as page's title instead of "My View 123".
Did you manage to do that?

Thanks for your answer.

#5

mas160 - October 9, 2009 - 08:06

Yes, I simply activated replacement view for "taxonomy/term" taxonomy_term that comes with views2, into argument "term id (with depth)" I set My View %1 in Title field, then saved and pointed to a taxonomy page and, after a site cache cleaning, title of page was, say 123 is the tid and fruit is term name, My View fruit and not My View 123.
That's all I done, and hope is clear. English is not my natural language, so I can write like Robinson Crusoe's Friday :D

 
 

Drupal is a registered trademark of Dries Buytaert.