I have the following fields in content type ‘Articles’

Year: Volume: Issue: Title: Description: Upload file:

Now I want to create a custom pages tpl.php and categorized based on Year, Volume, Issue. So the output should be like below. On clicking issues, it should display the all the posts. (2013/volume 3/Issue 1)

2013 Volume3 – Issue1, Issue 2

2012 Volume 2 – Issue1, Issue 2, Issue 3

2011 Volume 1 – Issue1


Instead of modifying any template files, you should most probably be looking into the Views module, a module that, per its project page, is useful for a variety of tasks, one of which seems particularly on point here:

You want a monthly archive similar to the typical Movable Type/Wordpress archives that displays a link to the in the form of "Month, YYYY (X)" where X is the number of posts that month, and displays them in a block. The links lead to a simple list of posts for that month.


I could be misreading your question, but it sounds like what you want is a view. To do this you will need the Views Module. Once it is installed (Modules > Install New Module), you will create a new view (go to Structure > Views > Add New View); you can choose to display it as a page, a block, or both. Then, choose to return fields, pick the fields you want from your Article content type, and apply the proper sorting and grouping to get what you need.

If you want to use a tpl.php file to change the markup of your view results, check out this page on views template files.

Hope that helps!

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.