Taxonomy/Content Type/Views Question

kompressaur - January 27, 2009 - 23:45

Hello ive been a little over my head with drupal for the past year but im slowly learning how things work. Ive finally got Pathauto working on my site and i see now the importance of taxonomy. I was wondering if anyone could help me over my latest stumbling block?

I have a Category structure of

football/scotland/division-two/stirling-albion/

(sport/country/league/team/)

I have a 'football match report' Content Type with 'football' category attched to it. 1st thing i need to look at is that when i add all the teams in scotland and then for example-

football/scotland/division-two/stirling-albion/reports

or

football/scotland/division-two/stirling-albion/team-news

that will be over 40 teams all with at least 2 sub categoriesd of 'reports' and 'team-news'. add to this the 500+ other teams i will be adding to football/england and football/france then that is going to be a hell of a big select list on this content type. Shall i make more content types? One Content Type per league maybe? I can't get my head around it at all. Is having 30 or 40 content types on a drupal website natural? Will it effect my sites performance?

In an ideal world i would like just one content type for 'football teams'. Peaple click that and are then confronted with a form that lets them choose between

reports
team news

then they would need to choose the team. Ideally they would chose 'england' and then 'the league' and then up pops the teams in that league for them to make their choice. Even better for me would be for them to chose a HOME TEAM and then an AWAY team and all this is stored somewhere for future interactivity. Maybe thats a bit beyond me for now. I would be happy just to let folks submit football team reports or team news via the littlest amounts of content types. If it needs 50 content types and it wont harm my server load then so be it. I just dont want to take the wrong turning form the off.

Can anyone offer me any advice?

thanks

Sorry i suppose the Views

kompressaur - January 27, 2009 - 23:50

Sorry i suppose the Views sides of things come in when i want to display the content again. I was wanting to show all the 'stirling albion' submitted stuff on my

football/scotland/division-two/stirling-albion/

page. I know i can create a view and display it on that page. Would i then have to create over 500 views for all the other football teams? thanks

_

WorldFallz - January 28, 2009 - 00:27

No, you can create a view with arguments so you don't have to make a ton of separate views. See the screencast at http://drupal.org/node/247205 for an idea of how to do this. It's for d5 but the concepts are the same, though the UI looks different.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

a brilliant WorldFallz

kompressaur - January 28, 2009 - 17:43

a brilliant WorldFallz thanks. I will go and check it out. Im so glad i never went Views daft. Much appreciated

I seem to be going round in

kompressaur - February 9, 2009 - 18:23

I seem to be going round in circles here :( Does anyone mind if i just type out all the problems that i am having trying to make my drupal site? I have been at it for nearly a year now and ...well as i said i seem to be going round in circles. I think i have a problem trying to relate taxonomy with content type and views etc.

Taxonomy
Ok i run a sports betting site. I wish to post an article on a football team called Stirling Albion. As per the above i have a category stucture of-

football
-england
-scotland
--division-two
--division three
---stirling-albion
-france
etc etc

I click submit Content Type 'football' and in there i have the vocab above in there. Ideally i would like to just choose Stirling Albion and it would automatically add it's parent categories (football,scotland,division two) to the node as well as Stirling Albion. I am using a a Single Hierachracy. I dont want to use free taggng as i know that my members submitting the articles wont use it and its hard enough just gettting them to post never mind do 'adminy' things :(

I will leave it as that for now as i have a load to be getting on with elsewhere. I would need to have sub-category menus displaying on on their relevent sub catergories. Also an image block that changes depending on category. I will have over 500 teams and if each team has its own menu and also an image do you think my site will be able to handle this? Ive got ok hosting. Oh im using a drupal 5 version. I would upgrade but i use vbdrupal. All drupal assistance would be much appreciated. Even just a point in the right direction.

How would you go about doing what i am trying to do?

thanks

_

WorldFallz - February 9, 2009 - 18:59

Ideally i would like to just choose Stirling Albion and it would automatically add it's parent categories (football,scotland,division two) to the node as well as Stirling Albion.

Where-- in what context? On the taxonomy links? In the node.tpl.php? A block? There's various ways to get at the hierarchy, but it all depends on where you're working.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

a brilliant a reply

kompressaur - February 9, 2009 - 19:32

a brilliant a reply WorldFallz thanks. I will try my best to explain what i am doing and i appreciate your attention.

I think i mean in the node.tpl.php (the bit to the right of the title when viewing the node in teaser and full mode) that is only a small part of my problem though.

I would like to have a menu system throughout the site. When i am in /football i get a general football menu linking to the countries. then when i click 'scotland' i am taken to my scottish page and on it there will be a menu in a block (where the 'football' menu was) with my scottish leagues on it 'division one, division 2 etc) then when i click on 'division 2' i am taken to my scottish division two page and on that i have a new menu block that has all the nodes (teams) in the the scottish division two category.

My main concern at the moment is that with a single hieracy(??) category system when i chose a team like Stirling albion it will be from a pull down category list and it will have over 500 teams on there and be hard to locate. also as i say my Stirling albion node will only be 'tagged' (?) with 'stirling albion' it being the chosen category. I would like folks to be able to click on 'football', 'scottish football', 'scottish division two' or 'stirling albion' when viewing a node in full mode.

I think im talking about 2 or 3 differant things here but i think they are all related. Any help would be great.

thanks

_

WorldFallz - February 9, 2009 - 19:48

For a nice taxonomy navigator i like that http://drupal.org/project/taxonomyblocks module, but there are others i think.

To retrieve an array of the taxonomy hierarchy, there's the taxonomy_get_tree function you could use to setup something in template.php (with a preprocess function) that you could then print in node.tpl.php.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

thanks WF. Taxonomy blocks

kompressaur - February 9, 2009 - 20:57

thanks WF. Taxonomy blocks looks hard enough to do the job but sadly for me its for drupal 6 only. Regarding the 2nd part i think i will have to look into that more as the template files dont seem to be in the theme that i am using. its a vbdrupal specificc thing.

"To add new theming functions create a custom.php file and includes your new functions" - is what its telling me to do. Maybe that is beyond me still. I can live without that for now i suppose. I suppose im really looking for a way for people to choose one of 500 categories in a single hierachy (cant spell that word:( - )

I bet it so easy it's hard.

_

WorldFallz - February 9, 2009 - 21:14

For some other ideas for taxonomy navigation you might also want to check out:

Also, one i can't believe I missed which seems to be targeted exactly at your use case: http://drupal.org/project/taxonomy_multi

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

Thanks for getting back to

kompressaur - February 15, 2009 - 09:47

Thanks for getting back to me WorldFallz. Ive been at it hard ever since. Ive fell out with website colleagues and family and friends and it's all related to this. Its wrecking my life. I havent done anything barr look at this or fall out with people it seems :(

The Taxonomy Multi does look ideal for me WF but again it's a 6. module. I have managed to sort out my submission form categories with Hierarchical Select module. Perfect it is for the job (just a shame i cant get a pop up calendar to work with it but thats another problem for another week) So now i have a nice easy way for people to choose a term as low as 'Stirling Albion' and on a Stirling Albion Node it shows 'football' 'scottish football' 'division two' also. Thats great it is and it reallyhas solved that for me.

Now it's the navigation through the terms etc i am trying to sort out. Iv got 'Taxonomy Menu' here and this might be able to do the job for me. I just want to have 'Football', 'Horse Racing', Cricket etc as top level links in the menu block and then when you click on 'Football' you then get all the 2nd level (secondary links?) displaying below it. then you click 'Scotland' and you get all the scottish league below it, click 'division 2' and you get ll the teams as menu items. Then if you was to click 'Cricket' it would take you to my cricket area and the menu would just show Cricket expanded and al the child menus of cricket.

I think 'Taxonomy Menu' does this but i cant get more than 1 vocab name to show in the the block at the highets level (no 'footbal' if 'horse racing' is showing. I dont know if its just me or if 'Taxonomy Menu' wont do the job but i will keep looking at it. I think the problem is i dont understand the relationship between 'categories' 'menu items' and 'views'. Ive been at it a year now and i should. I understand what each of them are but i think im faling down when i try to put them all together. actually tell a lie its all to do with 'arguments' i think. I know all about arguments in real life lately and its due to my lack of understandment of drupal 'arguments'. Maybe arguments would pull it all together.

That 'Taxonomy Navigator' you have posted a link to sounds as if it would do the job im asking. Does anyone know the differances between that and the 'Taxonomy Menu'. If you was to try to do what im trying to do folks how would you go about it on drupal 5.? Sorry for asking. I just thought i would cut to the chase. Yes im probably enjoying learning it all and yes i smoke too much and sit on my own for too long, but im starting to think tha it might be easier for me to see how soeoe with good drupal knowledge would do it and from there i could work backwards and understand it all :\

'Vocabulary Index' looks interesting too thanks WorldFallz. I will go and have a look at that too. this is gonna cause me to miss my stepdad's birthday today. He'll have to understand. This has to be finished.

lol this is gonna be about

kompressaur - February 15, 2009 - 09:50

lol this is gonna be about an inch thick in a moment. Sorry just to ask folks quickly,. im trying to just show categories by term here and not trying to create a View for terms am i?

see i just can't get it

Im just getting on with stuff

kompressaur - March 10, 2009 - 01:51

Im just getting on with stuff but a quick mention to those that may have a problem grasping it all like me that this seems to have put me on the road to where i am going
http://drupal.org/project/taxonomy_context

 
 

Drupal is a registered trademark of Dries Buytaert.