5 Replies Latest reply: Mar 6, 2013 3:04 PM by fac586 RSS

    horizonal sub regions

    joelanier
      I have read similar posts, sorry to do this but I have to ask again.
      I am using APEX 4.0, my regions need to be displayed at "Display Point: Display Template Body 2" in column 2.
      I have 2 regions I want displayed horizontally, side by side.
      I want to use a parent region to contain them.
      I create my parent region, called it A, template = Reports, assign it to sequence = 10.
      I create my 2 sub region (B) and (C), sequence 20 and 30, template = Navigation, picking parent = A.
      By default, B displays above C.

      After reading post: https://kr.forums.oracle.com/forums/thread.jspa?threadID=2155320&tstart=0

      I copied the Navigation template, creating a new one called NAV2 and added this in the sub-region template section:
      (this cut/paste) doesnt display well here:
      it is the exact DIV begin/end block as posted above,
      I am removing the beginning and ending brackets to
      see if this displays better... sorry

      div style="float: left;"
      #SUB_REGION#
      div

      I changed regions (B) and (C) to use template = NAV2, without any change in display behavior.

      I read further in the above post where it was recommended to reset the
      clear property, so I changed the above style like to:
      style="float: left;clear:none;"

      This still didnt work.
      Can someone tell me what I am doing wrong? Thanks
        • 1. Re: horizonal sub regions
          fac586
          joelanier wrote:
          I have read similar posts, sorry to do this but I have to ask again.
          I am using APEX 4.0, my regions need to be displayed at "Display Point: Display Template Body 2" in column 2.
          I have 2 regions I want displayed horizontally, side by side.
          I want to use a parent region to contain them.
          I create my parent region, called it A, template = Reports, assign it to sequence = 10.
          I create my 2 sub region (B) and (C), sequence 20 and 30, template = Navigation, picking parent = A.
          By default, B displays above C.

          After reading post: https://kr.forums.oracle.com/forums/thread.jspa?threadID=2155320&tstart=0

          I copied the Navigation template, creating a new one called NAV2 and added this in the sub-region template section:
          (this cut/paste) doesnt display well here:
          it is the exact DIV begin/end block as posted above,
          I am removing the beginning and ending brackets to
          see if this displays better... sorry
          Always post code using <tt>\
          ...\
          </tt> tags as described in the FAQ.
          <div style="float: left;"> 
          #SUB_REGION#
          </div>
          I changed regions (B) and (C) to use template = NAV2, without any change in display behavior.

          I read further in the above post where it was recommended to reset the
          clear property, so I changed the above style like to:
          style="float: left;clear:none;"

          This still didnt work.
          Can someone tell me what I am doing wrong?
          You have modified the wrong template. Region A is the container for subregions B and C, therefore it is the Reports template used by region A that must be modified to provide the wrapper templates for its subregions.

          Revert regions B and C to use the original Navigation template and delete the unnecessary NAV2 template. Create a copy of the Reports template, add the Sub Region Template:
          <div style="float: left;"> 
            #SUB_REGION#
          </div>
          and switch region A to use the new template.

          However, modifying a template to specifically handle subregions is probably overkill, only necessary for very specific layout requirements (dashboards for example), or reuse on multiple pages. For one-off layouts, specifying <tt>style="float: left;"</tt> in the subregions' Region Attributes property is the easiest way to lay out the subregions horizontally&mdash;provided the subregions have a template containing the <tt>#REGION_ATTRIBUTES#</tt> substitution string. Omar's problem was that his subregions originally had no template so this substitution never happened.
          • 2. Re: horizonal sub regions
            joelanier
            I appreciate your response.
            The simplicity is encouraging, so I must have missed something.
            Starting from scratch,
            1) I made 3 regions, A, B and C - all using the Navigation Template.
            2) I confirmed this template does have the #REGION_ATTRIBUTES# attribute.
            3) All are in Display Point: Display Template Body 2" in column 2
            4) Sequences 5, 10, 15 respectively.
            5) Then for the "subregions" B and C, I assign parent = A, and added the
            following line in the Region Attributes for B and C:
            {code}
            style="float: left;"
            {code}

            Region B still displays above/top of region C.

            I reread the other posts again and tried to set the clear attribute as follows
            {code}
            style="float: left;clear:none;"
            {code}
            No difference.
            What have I missed in your explanation? Thank you
            • 3. Re: horizonal sub regions
              fac586
              joelanier wrote:
              I appreciate your response.
              The simplicity is encouraging, so I must have missed something.
              You've moved the goalposts.
              Starting from scratch,
              1) I made 3 regions, A, B and C - all using the Navigation Template.
              Why is A suddenly using the Navigation template instead of the Reports template?

              What theme are you using? Many/most navigation templates have a [narrow] fixed width and are therefore unsuitable as containers for other regions. Take the APEX 4.0 Builder Blue theme for example: it's a physical impossibility for a region using its 103-pixel wide Navigation template to contain 2 other 103-pixel wide Navigation regions side-by-side...
              • 4. Re: horizonal sub regions
                joelanier
                That makes perfect sense. Once I got this to work I realized the limitation of the parent template size. I am traveling and wondered if there is a reference that tells the different region template widths? I will leave this open for your response, then I will mark it as closed. I appreciate your help!
                • 5. Re: horizonal sub regions
                  fac586
                  joelanier wrote:
                  That makes perfect sense. Once I got this to work I realized the limitation of the parent template size. I am traveling and wondered if there is a reference that tells the different region template widths?
                  No, just experience and the Webkit developer tools...