I am using version 1.25.8 of the Uploads module and was wondering how to display the category name of the file list. I can see how its done in the details view but not the summary view.
Many thanks
Mark
Module: Uploads manager
- Rolf
- Dev Team Member
- Posts: 7825
- Joined: Wed Apr 23, 2008 7:53 am
- Location: The Netherlands
- Contact:
Re: Module: Uploads manager
A few years ago I made a website where I needed this too. As far as I remember I could not find a available feature back then... So I created a UDT. Perhaps in the year 2018 there is a better way, but if not here my solution.
User Defined Tag, named uploads_category_name
In the template I use:
User Defined Tag, named uploads_category_name
Code: Select all
$id = isset($params['id']) ? $params['id'] : '';
$db = cmsms()->GetDb();
$query = 'SELECT upload_category_name FROM '.cms_db_prefix().'module_uploads_categories WHERE upload_category_id='.$id;
$result = $db->Execute($query);
if ($result) { echo $result->Fields('upload_category_name'); }
Code: Select all
{uploads_category_name id=$entry->category}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -