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?
[SOLVED] Front End File Uploads Category Help
[SOLVED] Front End File Uploads Category Help
Last edited by LeeUmm on Wed Feb 27, 2008 2:19 am, edited 1 time in total.
Re: Front End File Uploads Category Help
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?
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
Last item is wrong (no nested {}), try with: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'}
{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
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.
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.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Front End File Uploads Category Help
go to http://smarty.php.net and read up on quotes.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Front End File Uploads Category Help
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.
Thanks a bunch. Can't believe I made that mistake.