Download Manager -- a simple category list to select files t
Posted: Tue Jan 24, 2012 5:11 am
I'm using Download Manager to create a download page with two content areas, a main content area and a sidebar content area. I'm using the sidebar content area to create a category list of links that consist of list items with URLs plus a query string that includes the page alias and a category alias. I want to click on a category and have files in that category be displayed in the main content area.
Heres the tag I'm using in the main content area (where I want the list of files);
{cms_module module='DownloadManager' alias=$_GET['cat']}
and the TAG for the sidebar content area that displays and unordered list of URLs with
a query string that includes the page and a category 'alias':
{cms_module module='DownloadManager' template="category_list"}
=============================================
This is the template I'm using for the category list:
<div class="side-block" >
<h3>Download Categories</h3>
<ul>
{foreach from=$items item=item}
{if $item->itemtype == 'header' }
<li class="heading">
<a href="{root_url}/index.php?page=team&cat={$item->alias}">{$item->name}</a>
</li>
{if count($item->subcategories) > 0 }
<ul>
{foreach from=$item->subcategories item=subcat}
{if $subcat.filesnb > 0}
<li>{$subcat.link}</li>
{/if}
{/foreach}
</ul>
{/if}
{/if}
{foreachelse}
{$nodownloads}
{/foreach}
</ul>
</div>
=============================================
My problem is that it doesn't work. I'm new to Smarty and I'm not quite sure how Smarty handles the $_GET['alias'] php variable or if I even have the syntax right.
I get an error:
'Selected Category does not exist'
when I select a category from the sidebar
Any help would be greatly appreciated.
Thanks,
Heres the tag I'm using in the main content area (where I want the list of files);
{cms_module module='DownloadManager' alias=$_GET['cat']}
and the TAG for the sidebar content area that displays and unordered list of URLs with
a query string that includes the page and a category 'alias':
{cms_module module='DownloadManager' template="category_list"}
=============================================
This is the template I'm using for the category list:
<div class="side-block" >
<h3>Download Categories</h3>
<ul>
{foreach from=$items item=item}
{if $item->itemtype == 'header' }
<li class="heading">
<a href="{root_url}/index.php?page=team&cat={$item->alias}">{$item->name}</a>
</li>
{if count($item->subcategories) > 0 }
<ul>
{foreach from=$item->subcategories item=subcat}
{if $subcat.filesnb > 0}
<li>{$subcat.link}</li>
{/if}
{/foreach}
</ul>
{/if}
{/if}
{foreachelse}
{$nodownloads}
{/foreach}
</ul>
</div>
=============================================
My problem is that it doesn't work. I'm new to Smarty and I'm not quite sure how Smarty handles the $_GET['alias'] php variable or if I even have the syntax right.
I get an error:
'Selected Category does not exist'
when I select a category from the sidebar
Any help would be greatly appreciated.
Thanks,