piper338 Posted March 24, 2010 Report Share Posted March 24, 2010 Hey guys, Im trying to have some kind of a document center in my pilot center, So I created a category in the downloads called Documents, Now I want to display only that Category in the Profile_main.tpl I used <?php MainController::Run('Downloads', 'index'); ?> and it displays all the downloads. How would I accomplish this could I use an IF statement? Thanks, Chad C. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 24, 2010 Administrators Report Share Posted March 24, 2010 If you know the category ID, you can do this in the template: Template::Set('allcategories', array(DownloadData::getAsset($id))); Template::Show('downloads_list.tpl'); OR the category name: Template::Set('allcategories', array(DownloadData::findCategory($categoryname))); Template::Show('downloads_list.tpl'); And it'll show that list. Just change the ID or the category name Quote Link to comment Share on other sites More sharing options...
piper338 Posted March 24, 2010 Author Report Share Posted March 24, 2010 If you know the category ID, you can do this in the template: Template::Set('allcategories', array(DownloadData::getAsset($id))); Template::Show('downloads_list.tpl'); OR the category name: Template::Set('allcategories', array(DownloadData::findCategory($categoryname))); Template::Show('downloads_list.tpl'); And it'll show that list. Just change the ID or the category name Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.