Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > A list of categories, each with an associated image View modes: 
User avatar
Member
Member
DanM - 9/4/2013 6:05:03 AM
   
A list of categories, each with an associated image
Hi,

I've been working on a category list for the front page. It will be in the sidebar. It will also have an image associated with each category (like finance with an svg dollar sign or water with an svg droplet).

I am working with the portal method. I just wanted to ask; is there a way that I can add an image (or file upload) field in to the category General info tab?
I'm new to kentico, so I am sometimes unaware if there are ways to do this other than create my own functions/controls.
One other way I can think of doing it is to upload images with the category names, then use a transformation to load in the category name to a url like this -
www.mysite.com/images/<%# Eval("CategoryDisplayName") %>.svg

This seems like a very poor solution to me and I'm sure that there must be a better way of doing things, but can I only achieve that by creating my own cs functions and doing the whole thing through visual studio?

I'm currently using a Category list with a transformation that i have written myself.

Bonus question, I'm guessing that the best way to organise blog posts and articles by category is to create a set of categories and then associate them, right?

I apologise if these questions seem pretty basic, but this is my first time fully building a .net website.

Thanks,
Dan

User avatar
Member
Member
vcarter - 9/4/2013 2:34:34 PM
   
RE:A list of categories, each with an associated image
Dan are categories a custom document type you created? If so, you can add additional fields via the SiteManager, and you can customize the editing form for your document type. There is a media selection field type that will allow you to associate an image from your media library, which can then be referenced in your transformation.

As for your second question, what do you mean by "categories"? Are the document types or are these separate from the categories you mentioned above?

If they are document types you can link them via the related documents functionality, or you could create a mult-select field on your form that was populated by your category list. Then use this list as a filter for your sub-sections.

Does this help?