In using the CustomContent module, the one problem I'm up against is that using {if $ccuser->loggedin() } on a page, makes it impossible to use a WYSIWYG editor for the page since it mangles the right arrow into its html equivalent, thus breaking the functionality.
Would it be possible to wrap the $ccuser->loggedin() in a UDT or GCB so that I could use a WYSIWYG editor ?
Thanks!
[solved] Eliminate -> syntax with UDT or GBC or Plugin
[solved] Eliminate -> syntax with UDT or GBC or Plugin
Last edited by tmk on Fri Jan 30, 2009 12:24 am, edited 1 time in total.
Re: Eliminate -> syntax with UDT or GBC or Plugin
That is stuff that should go into your template... not the content block... as the name said, content blocks are for content It'll make your life a lot easier
Best
Nils
Best
Nils
Re: Eliminate -> syntax with UDT or GBC or Plugin
I did this for a site, the custom content was so you had to login to get the distributors discount, and every time the editor made changes to page content it munged the code so I put it in a GCB and call it in page now all works fine...
[solved] Eliminate -> syntax with UDT or GBC or Plugin
Better than in a GCB, I made a UDT wrapper.
So now I don't have to worry about the Wysiwig editor eating my protection logic.
TMK
Code: Select all
// UDT name: FeUserLoggedIn
global $gCms;
$feusers = $gCms->modules['FrontEndUsers']['object'];
$userloggedin = $feusers->LoggedIn();
$username = $feusers->LoggedInName();
$userid = $feusers->LoggedInId();
$useremail = $feusers->LoggedInEmail();
$gCms->smarty->assign('feuserloggedin', $userloggedin);
$gCms->smarty->assign('feusername', $username);
$gCms->smarty->assign('feuserid', $userid);
$gCms->smarty->assign('feuseremail', $useremail);
// in your page content. first make a call to the UDT to set the smarties
// {FeUserLoggedIn}
// then you can use:
// {if $feuserloggedin }
// protected content
// {/if}
// you also have access to any other FEU value you've smartied
TMK
Re: Eliminate -> syntax with UDT or GBC or Plugin
Well I'm no programmer, HTML/CSS for me but thanks...
please to mark first post as [solved]...
please to mark first post as [solved]...