Hello i have a vocab named 'categories'. I also have a vocab called 'tags'. I have added a term referance field (categories) to tags vocab so as i can relate tags to categories. Previously on D6 i would have the same vocab for both but with D7's new fieldable taonomy i have to give this a go.

Im trying to create a view (block or views pane) that will display on my Categories term page. The view will contain the tags that are 'related' (have the category field added to them) on display. Im making this sound harder than it is is.

Term (tag vocab) 'Web Design' with term Referance (category vocab) 'Tech'. when i visit 'Tech' i see a view in the sidebar displaying 'web design'.

Can anyone give me any pointers in creating this View? I think im using the wrong relationship possibly. I have three options. The Optional field is my category field.-

Taxonomy term: Optional (field_optional) This is an alias of Field: Optional (field_optional).

Taxonomy term: Content using Optional Relate each Content with a Optional set to the term.

Taxonomy term: Taxonomy term using Optional Relate each Taxonomy term with a Optional set to the term.

I think if i at least knew the right one to use it might help me acomplish my task. thanks

Comments

merlinofchaos’s picture

You probably want the first one. And an argument with a default that pulls the term from the URL. Be aware that the relationshp is unidirectional, so it must relate from the term with the field to the term being referenced. Alternatively there should be a reverse entry as well which would relate the other direction.

fadgadget’s picture

I posted that elsewhere im sorry. I got no response. Each tag term has a category term attached to it.

Tag - Category
web design - tech
gadget - tech
scottish div one - football
team talk - football
etc etc

Two views im trying to make are-
1) A page view. This will have a lost of loads of tag terms. It will have a category term filter on it. Choose 'tech' from the filter and it will return only 'web design' and 'gadget'. Choose football and you get 'scottish div one' and 'team talk'

2) A Block that appears on on Category term pages. If i vist tech page then 'web design' and 'gadget' appears in the block. If i visit my football page then i will get ....yip you guessed it...'scottish div one' and 'team talk'.

Ive been using Views with drupal since D4, Only recently moved up to D7 though and whilst having taxonomy terms as fields is jsut the best thing ever i have to admit im still trying to get my head around it. I think i even accidently created the views i am after a few weeks ago as a trial but not im trying it for real i am either having a blonde moment or its as tricky as i am appearing.

Can anyone suggest anything to help me along my way? Ive been trying to accomplish this for over 12hrs now.

Thanks

fadgadget’s picture

ah a reply from the man himself thanks merlin. Well that will give me something to go on. I will go and give it another try taking in what you had said. Im all over the place here and at least if i am roughly on tthe right path then i wont go quite as mad. thanks and i will be back good or bad with my results.

merlinofchaos’s picture

It really shouldn't be tricky, as long as you have the right relationship.

fadgadget’s picture

lol thats what my mum says merlin. ooops ill get told off for 'adding noise' to the issue queue. i cant help myself.

fadgadget’s picture

This is what im doing as i go so as it might help someone if not myself. I find it easier to talk as i go as ithelps me think.

Page View
1) Create a new View type Taxonomy Term. Ill try a Page view first so arguments will come later and i dont mean between me and folks on this issue. Add field Taxonomy term: Name whilst views is doing it for me now.

2) Add filter criteria. Taxonomy term: Vocabulary. Select my 'tags' vocab. is one of

3) Add relationship. Taxonomy term: Optional (field_optional) This is an alias of Field: Optional (field_optional). Ill 'require' this too. Good my auto preview seems to be only showing me tags that i think ive got category fields on. Why was this so hard before? ah it was because i was trying to make the block view...anyhow....

4) Add another filter. this time exposed. Using the same field as the relationship would make sense so ill add Taxonomy term: Optional (field_optional) This is an alias of Field: Optional (field_optional). Now i add the relationship to the filter 'term from field_optional'. expose it (oooer) leave everything as it is for now...save and pray....dissapointment kicks in when the filters dont filter on 'tech' nd 'football'.

I must have done something wrong. It looks like it should work to me. Maybe my relationship is the wrong way round? When i visit my 'tag' vocab i have a field

field_optional Term reference with my categories (optional) as referencing vocab.

when i visit my categories vocab at admin/structure/taxonomy/optional/fields i dont have any term reference field. Maybe i could be doing it the wrong way round? mmmm its a possibilty. As i said the newness of tax fields to me is my downfall. I'd love to read more about it if anyone has any links. I have read a bit about it. I think i understand the concept of it as for years i was using nodes as tax references on D6.

Can anyone see where i might have went wrong above?

thanks

fadgadget’s picture

I dont know if it will help but here is my view url after chosing 'tech' in my views exposed filter
http://onlineplac.es/taxtest1?field_optional_tid=5232&=Apply

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)