[SOLVED] Front End File Uploads Category Help

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
LeeUmm
Forum Members
Forum Members
Posts: 37
Joined: Mon Jan 28, 2008 3:14 am

[SOLVED] Front End File Uploads Category Help

Post 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?
Last edited by LeeUmm on Wed Feb 27, 2008 2:19 am, edited 1 time in total.
LeeUmm
Forum Members
Forum Members
Posts: 37
Joined: Mon Jan 28, 2008 3:14 am

Re: Front End File Uploads Category Help

Post 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?
alby

Re: Front End File Uploads Category Help

Post 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
LeeUmm
Forum Members
Forum Members
Posts: 37
Joined: Mon Jan 28, 2008 3:14 am

Re: Front End File Uploads Category Help

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Front End File Uploads Category Help

Post by calguy1000 »

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.
LeeUmm
Forum Members
Forum Members
Posts: 37
Joined: Mon Jan 28, 2008 3:14 am

Re: Front End File Uploads Category Help

Post 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.
Post Reply

Return to “CMSMS Core”