Is there a way to display the Name of the Category of the current entry? I am aware of the category tag pair but I don’t want to show a listing of all categories.
Thanks,
Forrest
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 02, 2011 2:28am
Subscribe [2]#1 / Apr 02, 2011 2:28am
Is there a way to display the Name of the Category of the current entry? I am aware of the category tag pair but I don’t want to show a listing of all categories.
Thanks,
Forrest
#2 / Apr 02, 2011 6:31am
If you only want to show one category, use the limit parameter…
{categories limit="1"}
{category_name}
{categories]Unless I’m misunderstanding what you’re wanting to do?
#3 / Apr 02, 2011 1:18pm
Hi Iain,
Let me explain a little further. I have a browse categories feature on my site http://www.rouviere.com. The site is very fresh and there are not a lot of photos uploaded yet, but when you click on browse stock photos you get a popup window with a list of all the current categories and the number of images associated with it. When you click on the category listing it takes you to another page that shows all the entries associated with that category. This is where I would like to post the category name.
I added the code above and it shows in its raw form. I hope this clarifies a bit further what I am after.
Thanks.
#4 / Apr 02, 2011 5:41pm
Ah, then you want the category heading tag
You’ll need to add the channel parameter for the tag as you’re using the ‘category name in URL’ feature.