Jump to content

Recommended Posts

Posted

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.

  • Administrators
Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...