5 Replies Latest reply: Oct 3, 2013 3:34 PM by jrimblas RSS

    Oracle Apex 4.0 & Div Based Themes

    Walt K

      I am using Oracle Apex 4.0. I know there are some div based themes associated with this release.

       

      Is what is generated in the substitution string #BODY# still table based? And if it is by default, how do I control what is generated for #BODY#?

       

      Thanks!

        • 1. Re: Oracle Apex 4.0 & Div Based Themes
          jrimblas

          Yes the Item placement will still be table based.

          But your regions can be all div based as long as you don't use the column placement field.

           

          You control what's int he #BODY# by controlling the templates, but some things like tables for item placement is out of your control.  You can however add elements that open and close divs to make the items do what you want.  Hope this makes sense.

           

          Thanks

          -Jorge

          • 2. Re: Oracle Apex 4.0 & Div Based Themes
            Walt K

            I understand what you are saying. And have done some heavy modifications on templates. I would just word "You control what's int he #BODY# by controlling the templates" differently. I would say "You control what is around the #BODY#" by controlling the templates".

             

            For example, I can control the format within the #BODY# by adding DIV's and CLASS's around the body in the template. But I see no way that I can convert the internal formatting of the #BODY# and use DIV's instead of TABLE's.

             

            At least I believe this is true. I have not seen a "Template" for the #BODY# itself. If I have an HTML region where I am placing some items I can control the format of the region. But not the format of the ITEM's I place in the region. They will be table based. They will never be truely DIV based. At least not in 4.0.

             

            Right?

             

            Thanks! What you say makes sense.

            • 3. Re: Oracle Apex 4.0 & Div Based Themes
              jrimblas

              You're right, in 4.1 and below, the moment you add a an item you get a table. Whether you want it or not.

               

              Now that said, you can still add some div inside the body by doing sub regions.  I've created fairly complex layouts inside a region this way.

              The basic technique is:

              1. Add a No Template sub region with your HTML.  For example an "Open div" region with the code "<div class="specialStuff">"

              2. Add a No Template (or minimal styling region) sub region with some items

              3. Add a No Template sub region with HTML that closes the div:  "</div>"

               

              The other thing you can do is add some targeted CSS to the table.  Sometimes that's needed also.

               

              Hope this helps a bit.

              Thanks

              -Jorge

              • 4. Re: Oracle Apex 4.0 & Div Based Themes
                Walt K

                Now that is some interesting stuff. I have never played with sub-regions. I will have to take a look.

                 

                I have however played with the "targeted CSS". And gone as far as to add some classes on inner elements within #BODY# using jQuery. I started using the jQuery technique on outer elements too. For example to add a class on #wwvFlowForm.

                 

                Thanks Jorge!

                • 5. Re: Oracle Apex 4.0 & Div Based Themes
                  jrimblas

                  In that case, perhaps you'll find something useful in this presentation I did at KScope this summer:

                  That's Not Where I Want That

                   

                  It's not the same without the explanations, but you may be able to get some more ideas. To navigate, click inside the first slide and then press the space bar.

                   

                  Thanks

                  -Jorge

                  http://rimblas.com/blog/