visitor A > template A, visitor B > template B

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
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

visitor A > template A, visitor B > template B

Post by jack4ya »

Hi,

title says it in short, but what I need:

When a regular user (A) visits the site they see a certain template, let's call it template A.
But when a registered user B visits the same site/pages, they see template B. (with added content blocks, different page layout and different print template)

This registered user may be a FEU (FrontEndUser maybe through FEU module), or just a BEU (BackEndUser an editor or whatever.)
It's not that important, because user B will only be 1 person...

I need registered user B to be able to view different content blocks and print the same page_id but in a different template then a regular user A.

Maybe like this:
• User B first sees template A, but like the {editif} tag, they see an extra link/button in the page (unlike user A).
When user B clicks the linke/button the page reloads with template B (and then they can print it)
• User B only sees template B (and then they can print it, so no step in between)
• (providing only user B with a different print template would not suffice, they need a different page template to, due to diff. content blocks, or maybe hiding them in css, so then: same template but use stylesheet A and stylesheet B approach??)
• better option you came up with :D

I already modified {editif} tag to reload the same page with the page_alias, this action is only provided to user B.
Now, how can I add a if/else load template thingie to it? Or is this a foolish approach?
^^^ I think so... I guess we can consider this a "foolish approach"...
Last edited by jack4ya on Thu Sep 18, 2008 9:05 am, edited 1 time in total.
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

Re: visitor A > template A, visitor B > template B

Post by jack4ya »

note to myself: http://forum.cmsmadesimple.org/index.php?topic=11689.0

***

I think I have it:

With custom content make content that is only shown to user B.
In this custom content area, display a stylesheet switcher form.
Then user B can switch to stylesheet B.
and then print...

However... in this way I would have to hide sensitive information with css, instead off not pulling it out the datebase all together...
Last edited by jack4ya on Thu Sep 18, 2008 9:18 am, edited 1 time in total.
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

Re: visitor A > template A, visitor B > template B

Post by jack4ya »

Or I can place the sensitive information in custom content also...
Last edited by jack4ya on Thu Sep 18, 2008 10:37 am, edited 1 time in total.
Pierre M.

Re: visitor A > template A, visitor B > template B

Post by Pierre M. »

Please view FEU+CC visual tutorial in the documentation.

Pierre M.
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

Re: visitor A > template A, visitor B > template B

Post by jack4ya »

Pierre M. wrote: Please view FEU+CC visual tutorial in the documentation.

Pierre M.
Didn't add any new things to my knowledge, but thanks anyway.
User avatar
duclet
Forum Members
Forum Members
Posts: 187
Joined: Fri Jun 23, 2006 12:55 pm

Re: visitor A > template A, visitor B > template B

Post by duclet »

If your template is flexible enough, you can try the method mentioned here:

http://forum.cmsmadesimple.org/index.ph ... 28.15.html

However, you will obviously, need to change some of the stuff around. Instead of using the cookie to determine the CSS, you should use the user.
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

Re: visitor A > template A, visitor B > template B

Post by jack4ya »

I've solved in a different way. Can't remember it now. (my mind is all over the place)  ::)
I'll come back to this quickly...
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

Re: visitor A > template A, visitor B > template B

Post by jack4ya »

That was quick...

Quite easy solution I might say so, using FEU and CC
Works for me... I am able to present a different css and certain content_blocks only to specific users.

For the diff in stylesheets >

      {if $ccuser->loggedin() && $ccuser->memberof('specialuser') }
            {stylesheet name='shylesheetforspecialuser'}
      {else}
            {stylesheet}
       {/if}

For the diff in content blocks >

      {* Start Private Area *}
      {if $ccuser->loggedin() && $ccuser->memberof('specialuser') }
            {content block="blockonlyforspecialuser" assign="blockonlyforspecialuser"}
                  {if $blockonlyforspecialuser ne ""}
                        {$blockonlyforspecialuser}
                  {/if}
            {else}
       {/if}
      {* End Private Area *}
Last edited by jack4ya on Wed Sep 24, 2008 3:08 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”