I have a content type called 'xyz'. Under that taxonomy select list that contain a,b,c. I am displaying taxonomy terms and I am able to display terms. I need to give link to content type nodes.here is my code. present it has linked to taxonomy/terms.

<li class='level".$level."'>".$bullet."<a href=\"$base_url/?q=taxonomy/term/".$value->tid."/pid/".$pid."\"> $value->name </a></li>

Create a view. Add a filter for content type. Then give that page url.

  • How to make in custom code? as in above link..any variables shd i change in the above? – Srinu Oct 24 '12 at 17:00
  • what is your question. You dont want to do it with views? – j2r Oct 25 '12 at 7:38
  • I want to do through custom module ..that's y..... – Srinu Oct 26 '12 at 13:23
  • In your SQL query, you need to specify the content type: $query->condition('n.type', 'xyz'). Also, you should use the l() function instead of outputting link tags and the theme_item_list() function to output lists. – Agi Hammerthief Mar 6 '14 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.