9 Replies Latest reply on Aug 2, 2007 3:01 PM by Günter Schenk

    User Access Level Defined Menus

      Hi,
      I'm trying to figure out if there's a way to use ADDT to manage what menus users receive on the same page... building the pages with files to the various menus. I know how to set up access levels and log in/out users fine, but I'd rather not build near-duplicate pages for administrators vs contributors, rather have one page with multiple menu alternatives or something.... Any help would be much appreciated.

      Thanks!
        • 1. Re: User Access Level Defined Menus
          Günter Schenk Level 4
          Hi,

          would you prefer to show/hide a certain menu item based on a certain access level then ?

          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: User Access Level Defined Menus
            RichMariner Level 1
            If you just dealing with two levels of users you can try using 2 <b>server side includes</b> on the page each wraped inside of a <b>conditional statement</b> that says to show this include if the value of a variable is 1 or <b>else</b> show this include. <br /> <br />My example is in ASP but the theory is the same. <br /> <pre> <br /><%<br />' Show IF Conditional region1 <br />  If "kt_login_id" = 1 Then<br />%> <br />  <%<br /> Response.write KT_include("bottom.inc")<br />%> <br /><%<br />  End If<br />' End Conditional region1<br />%> <br /> </pre>
            • 3. Re: User Access Level Defined Menus
              RichMariner Level 1
              Gunter beat me to it and used less words. :o)
              • 4. Re: User Access Level Defined Menus
                Günter Schenk Level 4
                Hey Rich,

                >>
                Gunter beat me to it and used less words
                >>

                psst, don´t tell this anyone else :: it´s because I´m simply not able to use more words :-)

                @ Nathan :: did you already have a look at ADDT´s own "Server Side Includes" behaviour which (unlike PHP´s native "includes") would enable you to build the to-be-included pages/fragments with DW and also have them seamlessly displayed in DW´s Design View, what´s not always possible with PHP´s "includes". Highly recommended :-)

                Günter Schenk
                Adobe Community Expert, Dreamweaver
                • 5. Re: User Access Level Defined Menus
                  Level 1
                  Gunter, You rock.

                  I recently got ADDT and didn't notice that in the featureset, I'll take a look at that right now and let you know if I have further questions.

                  Thanks a lot!
                  • 6. Re: User Access Level Defined Menus
                    Günter Schenk Level 4
                    Hi Nathan,

                    >>
                    I'll take a look at that right now and let you know if I have further questions
                    >>

                    that´s fine, however please ask stuff tomorrow -- I have used up all my words for today :-)

                    Günter Schenk
                    Adobe Community Expert, Dreamweaver
                    • 7. Re: User Access Level Defined Menus
                      Level 1
                      Hi Gunter... maybe you can answer tomorrow, since you're out of words for today...

                      I'm looking at the ADDT server side includes.. I built the 2 menus in separate php files to be included (I'm simple, I know): user.php and administrator.php.

                      User.php is to be displayed on both user levels (1, 2), and administrator.php should only show up on user level '2'. I don't see any advanced options for the server-side includes in ADDT to specify session variables such as access level... What am I missing?? Should I have another tab on the ADDT server side include window beside 'Basic'? You've been a great help.

                      Thanks!
                      • 8. Re: User Access Level Defined Menus
                        Günter Schenk Level 4
                        Hi Nathan,

                        >>
                        maybe you can answer tomorrow, since you're out of words for today
                        >>

                        wow, you are truly fortunate -- here in Germany it´s now past midnight, means that´s your "tomorrow" ;-)

                        >>
                        I don't see any advanced options for the server-side includes in ADDT to specify session variables such as access level... What am I missing??
                        >>

                        That´s a true observation, some ADDT server behaviours don´t have their own "condition builders", but then again there´s yet another "general purpose" ADDT behaviour named "Conditional Regions" at your disposal -- its submenu named "Show If Conditional Region" is the one to use for showing/hiding a certain page element (AFAIK this *should* apply to a "server side includes" instance too) based on a condition you can define in this behaviour´s "condition builder".

                        Cheers !

                        Günter Schenk
                        Adobe Community Expert, Dreamweaver
                        • 9. Re: User Access Level Defined Menus
                          Günter Schenk Level 4
                          Here´s a quick follow up to my last post:

                          >>
                          User.php is to be displayed on both user levels (1, 2)
                          >>

                          as this particular condition can have two possible either-or "states" (something that´s not covered by ADDT´s regular "condition builders"), you´ll need to go to the "Show If Conditional Region" *Advanced* tab and enter the following stuff:

                          @$_SESSION['kt_login_level'] == 1 || @$_SESSION['kt_login_level'] == 2

                          Günter Schenk
                          Adobe Community Expert, Dreamweaver