Page 1 of 1
[SOLVED] Front End File Uploads Category Help
Posted: Mon Feb 04, 2008 10:41 am
by LeeUmm
I've created the user group, page alias and file category as the same name. So for example:
User group: Client1
Page Alias: Client1
File Category: Client1
I have one template I use for the private area and I would like to only list files that the user has permission to see. Each group/user will only have one file category assigned to them.
I've tried this code but it throws and error saying cannot find category:
{$cgsimple->get_parent_alias('',$page)}
{cms_module module='Uploads' category='{$page}' mode='detailed'}
I'm basically assigning the page name to the variable page and using it for the file category. This should work since all the names are the same.
Suggestions?
Re: Front End File Uploads Category Help
Posted: Thu Feb 07, 2008 8:46 pm
by LeeUmm
Still haven't sorted this out as I moved on to other things.
I figure this has to be pretty easy because of how I've named everything.
Can anybody help out?
Re: Front End File Uploads Category Help
Posted: Fri Feb 08, 2008 7:50 am
by alby
LeeUmm wrote:
I've created the user group, page alias and file category as the same name. So for example:
User group: Client1
Page Alias: Client1
File Category: Client1
I have one template I use for the private area and I would like to only list files that the user has permission to see. Each group/user will only have one file category assigned to them.
I've tried this code but it throws and error saying cannot find category:
{$cgsimple->get_parent_alias('',$page)}
{cms_module module='Uploads' category='{$page}' mode='detailed'}
Last item is wrong (no nested {}), try with:
{cms_module module="Uploads" category="$page" mode="detailed"}
Are you sure of correct value of $page variable? Use a UDT?
Display your variable with {get_template_vars} because template variable for alias is $page_alias
Alby
Re: Front End File Uploads Category Help
Posted: Tue Feb 26, 2008 11:15 pm
by LeeUmm
I'm just getting around to this now as I've been a little busy and put this off.
I realized my mistake adding in the curly brackets to the variable and have since removed them, but it still doesn't work.
The variable $page does indeed contain the correct value, as I've outputted it in the template and it displays the correct value.
Here is what I had:
{cms_module module='Uploads' category='$page' mode='detailed'}
{$page}
and it gives me the error cannot find category and then displays the correct page alias below.
I've setup the correct permissions in the Uploads settings. I have the name set correctly, checked the box "files can be listed" and assigned the proper member group to the file upload category. Still nothing.
I've tried using variables $page_name, $page_alias and $page all with no luck.
When I run {get_template_vars} the output shows all the variables above with the same value.
I should note that when I hardcode a value of client1 in place of $page, it works fine.
Can anybody confirm this works? I'm pretty stuck and don't think this works as I've got things setup correctly I believe.
Re: Front End File Uploads Category Help
Posted: Wed Feb 27, 2008 12:48 am
by calguy1000
go to
http://smarty.php.net and read up on quotes.
Re: Front End File Uploads Category Help
Posted: Wed Feb 27, 2008 2:19 am
by LeeUmm
Doh! ha I didn't even have to go read, I knew the error. Weird how you just over look the minor things.
Thanks a bunch. Can't believe I made that mistake.