customcontent client area

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.
Locked
sloecoach

customcontent client area

Post by sloecoach »

Code: Select all

{cms_module module=CustomContent}
{if $customcontent_loggedin}    
Welcome <strong>{$customcontent_loginname}</strong><br />
{else}
<h1>You are not authorized to view this data</h1>
{/if}
this is the sample smarty code for customcontent. What I would like to do is dynamically load a global content block (with the same name as the $customcontent_loginname, like this:

Code: Select all

{global_content name=$customcontent_loginname}
but this doesn't seem to work. How would I go about something like this? The goal is obviously to have each customcontent user get their own custom global content block (created in advance, of course)

sloe
sloecoach

Re: customcontent client area

Post by sloecoach »

I've been playing around with this some more. If I use the code below:

Code: Select all

{cms_module module=FrontEndUsers}
{cms_module module=CustomContent}
{if $customcontent_loggedin}
Welcome {$customcontent_loginname} <br />
{global_content name=$customcontent_loginname}
{else}
<h1><span class="blue1">You are not authorized to view this data</span></h1>
{/if}
and I try to login as one of my users, I will be logged in sucessfully, but, the text will display "you are not allowed..." however, If I leave it on that page, and in another tab/window, clear the cache in the global settings, then go back to the previously mentioned page, and hit refresh, it works. once. if i reload again, back to logged in, but with the wrong content. Any thoughts?

sloe
sloecoach

Re: customcontent client area

Post by sloecoach »

I tried doing it manually

Code: Select all

{if $customcontent_loginname == 'fakeuser2'}
{global_content name='fakeuser2'}{/if}
and when it was still being wierd, I looked into caching. When I turned off the caching for that particular page, it seems to work even using $customcontent_loginname as a variable in the global content tag.

so problem solved. client section here I come. thanks for all the help me.:)

sloe
sloecoach

Re: customcontent client area

Post by sloecoach »

I'm not crazy, really. I just like talking to myself.

anyway, there's still some quirky behavior. It works most of the time, though, sometimes when I login it doesn't show me the unique content until I refresh the page. I have repeated this a few times, on different machines and browsers. There must be some kind of caching going on somewhere, but I don't know where or what.

sloe
Locked

Return to “CMSMS Core”