No announcement yet.

Arranging Menu / Layout

  • Filter
  • Time
  • Show
Clear All
new posts

  • Arranging Menu / Layout

    I want 4 sections - 3 as part of the menu, 1 for the editing forms.

    For the menu I want (1) the school logo on the left (10%), takes up the space of 2 rows. (2) the main menu on the top row that takes up 90% (3) the secondary menu that changes dynamically depending on what is selected on the top menu, also takes up 90%.

    Then below all of this I want to show the editable forms.

    I started to set this up with containers but I get scroll bars, titles and square buttons I don't want. I also can't have the editable form with 100%.

    I've attached a screen shot. Any help would be great. I'm new to this software and trying to figure out best practices. I'm comfortable around databases but not ones online.
    Attached Files

  • #2
    Re: Arranging Menu / Layout

    I haved used sc to get something similar using container first, then menu. Those squares u can get rid of in your widget settings, i think you have expandable or something set yes. I suggest you think of the container as columns. Your right column should have a top menu app as the ONLY widget, taking up whole right side. When you want the submenu line, that menu app will be called by a menu item of the top menu, so both show as you have but not in two widgets, only one. That way your other apps loaded by one or two menus all fall in the built in menu iframe below it. you can also get cool effects by have a top menu as horizontal, with vertical sub menus.

    you can also reverse that and have a vertical main menu, with horizonral submenus.

    as far as the scroll bars and titles, dont put a title on widget. play with your code, possibly using a blank app to displsy an image in that upper left? use html and style in the <img> tag to get width the way you want so no scroll.

    You can also load up a global variable with an image with html and so on, then use that in the app titles. It has a lot of options for messing with the way thungs look. I just tried a lot of ways till i got look and function i was happy with.

    Hope that helps a fellow programmer.
    good luck,


    • #3
      Re: Arranging Menu / Layout

      Thanks, your leaving me breadcrumbs down my path.

      I guess I'll do something like this:

      So this means I'll have a container with 3 widgets - main menu - top row, second row divided into two columns, column on the left is submenu, column on the right is the form I want to add/edit.

      If that's the case then when a user logs on, the container is what opens. Correct?

      When I'm toying with the layout should I only be using the tools within script case or should I be doing it manually?

      Got rid of the square button on the top left! Gotta love progress!


      • #4
        Re: Arranging Menu / Layout

        Now I'm just confused. I'm playing around trying to make the 'Menu using initial Application' and I'm stumped ... maybe I've been staring at it for too long. How do I set this up?


        • #5
          Re: Arranging Menu / Layout

          Hi. That example doesn't use containers. The menus each have a built in iframe for any content it needs to load up - it uses that iframe. You can force things back and forth to communicate between container columns, but I would advise to keep it simple at first - just use the menus. When you have a setup like the example, your menu (horizontal) must be what app taht gets loaded at login. The side vertical menu is teh default app for the first menu. You may have different side menus for different top menu items.

          I think the best advice I can give, based on the complex stuff I am into now, is start very basic and build. Start using the stock menus and such, and get something to work. It is so easy to get busted at the beginning on trying to get all sorts of complex effects. So far, I have not encountered anything I could not build using SC and some code in events.

          Whatever you do, do it within the SC project context - no editing generated code. Once in a while I end up looking at the generated code (with notepad++) or similar IDE, but only if I am encountering "bugs" (99% mine own fault, but 1% SC bugs I then report).

          The reason I say just get it working with as simple a menuing system as you can start with, is that SC apps are very easy to put into new menus and even containers. So you can get the core of the system working, then go back and work on version 2 which is more of a repackaging.

          One last thing - the containers can be the default app for the menu - or they can also contain the menu. Just remember that when you press teh menu items, they apps linked to them will load in the iframe of that menu.

          You will get it :-)


          • #6
            Re: Arranging Menu / Layout

            Thanks, this is incredibly helpful. I'm finding there to be a big disconnect between trying to set it up initially and the help /examples. They teach you one piece but not the overall concept.

            How do I set the vertical menu as the default app for the first menu? Also I'd like the initial thing they see (other than menus) to be the notice board. Do I set that up as the default app for the vertical menu? From a formatting standpoint is there anything else I need to know?


            • #7
              Re: Arranging Menu / Layout

              Got the default part set up.

              Now I'm trying to display the user name in the menu. In my header variables, I selected var and set it to $usr_name (from the security module) but it doesn't recognize it. It also doesn't give me an error. I'm confused because
              In the app_Login there is this:

              $usr_name = {rs[0][2]};

              Now the other two things I need to do are
              (1) pass the login name to the sub menu to filter that
              (2) have two select fields in the main menu (for school year and term) to also filter the sub menu.


              • #8
                Re: Arranging Menu / Layout

                Congrats on your progress.

                You reference the Global vars with brackets , so its like [usr_login] and so on. You can also just do things like:
                [glo_my_var1] = "hello";

                To see what variables are being saved in the session, you can look at the event code like you are doing, and also there is a thing in the development environment, look at the top menu View - Data in session. It will show you tons of other stuff, but you can see your session global vars and stuff SC has set, like [usr_login].

                Note that in each app, if you click application on the left menu, see the global variable item. If you reference a global name, it will show it automatically here and allow you to tell the system to make it an in or output, as well if it is stored in session (which I almost always do myself FYI) or as a parameter it sets for you (get put etc).

                Hope that helps.


                • #9
                  Re: Arranging Menu / Layout

                  This is so incredibly helpful, making steady progress.

                  1) I need to default the school year and term. My brain is thinking create a table for default term/school year. On the login screen in the background, look up the table, grab the info I need, declare it as global variable. I want to set it up as a table to make it easier for the administrator to change the default year when the term changes. Make sense?
                  2) Within a particular login session a user can view data from another term. Won't happen very often but option needs to be available. My brain is thinking on the main menu have 'Change Term/Year' as a button, that will send you to a form where you change the SESSION global variable but not alter the default value in default term/school year table. Make sense?
                  3) When user selects an option from the main menu I want a variable in the main menu header to update to reflect the change. Possible?

                  484| $saida_apl = $_SESSION&#91;'scriptcase']&#91;'sc_saida_menu_Teacher_ChangeDuties'];
                  485| $menu_Teacher_ChangeDuties_menuData&#91;'data'] = array();
                  486| $menu_Teacher_ChangeDuties_menuData&#91;'data']&#91;] = array(
                  487| 'label' => "" . $nm_var_lab[0] . "",
                  488| 'level' => "0",
                  489| 'link' => "#",
                  490| 'hint' => "" . $nm_var_hint[0] . "",
                  491| 'id' => "item_1",
                  492| 'icon' => "",
                  493| 'target' => "",
                  494| 'sc_id' => "item_1",
                  495| 'disabled' => "N",

                  I want to print the label so I put this in the header.
                  Header Variables
                  LIN1_COL1 - Value - [nm_var_lab]
                  Doesn't work. What did I do wrong?

                  4) I want the variable from (3) to default to the first option. I set that in OnLoad correct?