Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.8
Component:
block displays
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2010 at 05:51 UTC
Updated:
23 Mar 2010 at 03:30 UTC
Hi, I am using Views2 and Im working now on showing the terms I created using Taxonomy module of Drupal. I tried all the fields available for taxonomy category but can't produce the view I want.. How can I produce this kind of result?
Blog Topics // this is the header of the view
I hope someone have done this... Please share your knowledge to me.. Thanks!
Comments
Comment #1
dawehnerThis view does exactly what you want
Perhaps you have to add some filters.
Comment #2
dhon commentedThanks for the fast reply..I really appreciate your work.. I just want to know how will I change the link path of the category.. I looked into it and it just linked to my homepage...how can I link it to the page of the particular category???
like this one:
Blog Posts //title
Animal (2) //when I click the Animal link, it will go to the page of that term. e.g: http://mysitehome.com/category/vocabulary/animal
Human (10) //*same as above//
Thanks in advance! I know it will be easy for you..:)
Comment #3
dhon commentedAny solutions for this? Please I really need it thanks!
Comment #4
dawehnerYou can use hook_preprocess_views_view_summary and alter $vars['rows'][$id]->url
This is doable in your template.php
Comment #5
dhon commentedI can't understand what you instructed to me..
Do I need to create function hook_preprocess_views_view_summary on my theme's template.php then put $vars['rows'][$id]->url on its body code? I tried this and comes up to an error.. Please elaborate the solution more. Thanks!
Comment #6
dawehnerCheckout template_preprocess_views_view_summary in views code. There you see how the links are generated. With your own hook_preprocess_views_view_summary you can override the url .
Therefore you have to understand php.
Comment #7
dhon commentedstill can't get your point.. i know php but I dont understand where is the views code located? is it on the views folder? and another thing the url I want should be still dynamic depending what category is clicked.. Can it be done? please i really need this one badly.. many thanks to you!
Comment #8
dhon commentedstill looking for a solution to this...thanks!
Comment #9
dhon commented~bump!
Comment #10
dawehnerCopy this into your template.php
Rename the function. Check the view name and alter the url here. You have to know php to be able to do this.
Comment #11
dawehnerCopy this into your template.php
Rename the function. Check the view name and alter the url here. You have to know php to be able to do this.
Comment #12
dhon commentedi still cant make it work...
i copied the code on the template.php on my theme's directory.
change the name of view to blog_posts...
can you give more elaborated instructions? please..
Comment #13
dawehnerblog_posts is the name of your theme?
Can you define the url, you want to link to? Then i will write down the code for you, which will save time for me.
Comment #14
dhon commentedblog_posts is the name of the views... my theme's name is sandium
the URL i want is the URL for the respective term. So if I have three terms they have their URLs respectively. I guess we can get a way to get the URL depending on the term id?
Comment #15
dawehnerSo you need sandium_preprocess_views_view_summary
Comment #16
dhon commentedis that all I need to change on the code above???
Comment #17
dawehnerNo you have to add code, not hacking existing ones. I need to change on the code above???
Comment #18
dhon commentedyes please...i really cant do it... thanks!
Comment #19
dawehnerPaste this code into your template.php rename the function and install the devel modul. Then show us, what you get
Comment #20
dhon commentedthanks!