14 Replies Latest reply: Sep 21, 2011 4:54 PM by jasongreenberg RSS

    Transfering ap divs with their content to another html file

    jasongreenberg

      I am a bit of a newbie, I am creating my first in depth site and having a problem with ap divs.
      I originally created a template and used that template to create all my html content pages for the site.

      Now I needed to make some changes to some elements and rather than going to each html file and making the change I am wondering if there is a better way.

       

      I know I can insert divs from my css stylesheet from another html file but the problem is it just inserts the div without the content.  Is there a way to bring in a div including all

      the content that's inside the div? 

       

      Many thanks,

       

      Jason

        • 1. Re: Transfering ap divs with their content to another html file
          MurraySummers ACP/MVPs

          I am a bit of a newbie, I am creating my first in depth site and having a problem with ap divs.

           

          What are you using AP divs at all? 

           

           

          Now I needed to make some changes to some elements and rather than going to each html file and making the change I am wondering if there is a better way.

           

          You are needing to make changes to template-controlled pages?  You need to make these changes to the editable regions of those pages?

           

           

          I know I can insert divs from my css stylesheet from another html file

           

          That sounds confused.  You cannot insert CONTENT with CSS (at least not the way I think you mean).  You can only style existing content.

           

           

          Is there a way to bring in a div including all

          the content that's inside the div?

           

          Why don't you show us a page, and tell us what you'd like to change on that page?  And when I say "show" I don't mean a screenshot - we would need to see the page and its code (a link to the live page would be very helpful).

          • 2. Re: Transfering ap divs with their content to another html file
            jasongreenberg Community Member

            Many thanks Murray for your help.  I'm not sure why I'm using AP divs, I tried a using tables and regular divs and AP divs seemed to work out for me.

            I still don't really know the best way to do things and I've redone the site from scratch several times as I keep learning there are always better ways to do things...

             

            You are needing to make changes to template-controlled pages?  You need to make these changes to the editable regions of those pages?

             

             

             

            I looked into template controlled pages and this might be what I'm looking for as far as keeping the pages consistent for the future but as far as fixing what I've already done I'm wondering if there is a solution.

             

            I know I can insert divs from my css stylesheet from another html file

             

             

            That sounds confused.  You cannot insert CONTENT with CSS (at least not the way I think you mean).  You can only style existing content.

             

             

             

            Thanks, that is what I was wondering. The div info can be imported but the content can't.  Thanks!

             

            Why don't you show us a page, and tell us what you'd like to change on that page?  And when I say "show" I don't mean a screenshot - we would need to see the page and its code (a link to the live page would be very helpful).

             

             

            The website is:  www.dev.soundscapemedia.com so you can take a look.  The main thing I want to change is to make all pages consistent.  For example the login area on the top right corner.  If you click on the navigation buttons you will see that every page the placement of the login area is a little different and it's a real pain trying to match them all exactly.  What I'd really like to do is have the entire top section of the site (logo, login area, mp3 player, and navigation buttons) EXACTLY the same on all pages.  I want the mp3 player to continue playing when you go from page to page so I want to find a way to have the entire top section of the site always remaining when the users navigate to different pages.  The lower portion/body of the page should be the only thing changing when the user navigates from page to page.  Otherwise when the user gets to the homepage and the music starts playing then they go to another page the music will stop and then start playing again from the beginning and so on.  This would drive them crazy

             

            Many thanks for all the help, let me know if you have any ideas.

            • 3. Re: Transfering ap divs with their content to another html file
              MurraySummers ACP/MVPs

              I want the mp3 player to continue playing when you go from page to page so I want to find a way to have the entire top section of the site always remaining when the users navigate to different pages.

               

              The only quick way to do this would be to use frames. And there are so many compelling reasons not to do that, I wouldn't even consider it.  You could also use javascript to force a 'pop-under' window that contains your mp3 player, but honestly, I think that's just not wise or friendly....

               

              And to have music playing automatically when a page loads is the epitome of unfriendly, I think.  Give the user the option of enabling the sound, but don't start it without 'asking'.

               

              Standby while I look at your layout....

              • 4. Re: Transfering ap divs with their content to another html file
                jasongreenberg Community Member

                And to have music playing automatically when a page loads is the epitome of unfriendly, I think.  Give the user the option of enabling the sound, but don't start it without 'asking'.

                 

                 

                Thanks Murray, I totally understand how it can be unfriendly to have music playing automatically when a user loads a page, but this is a company that licenses music and the user navigates to this website to listen to music from this company so it's really important that the user hears what the company has to offer music wise.  I think in this case it's not really unfriendly to have music play because this is what the user is looking for. 

                 

                Regardless if we decide to have music play automatically or not, if the user hits the play button and the music starts to play and then they navigate to another page, it should continue.  It's also a matter of not having to load the entire top section of the website for every page navigated to since the content should be exactly the same for the top section of every page.  I messed around with frames a bit but didn't have much luck, I couldn't get the top frame to smoothly blend to the bottom portion.  Things didn't line up properly and I couldn't figure out how to get this going properly.  What about iframes?

                 

                Many many thanks!!!!

                • 5. Re: Transfering ap divs with their content to another html file
                  MurraySummers ACP/MVPs

                  Read the link that gramps gave you in the other thread you started....  I'm not optimistic.

                   

                  IFrames won't do the job at all.

                  • 6. Re: Transfering ap divs with their content to another html file
                    jasongreenberg Community Member

                    Will do, thanks for all your help!

                    • 7. Re: Transfering ap divs with their content to another html file
                      MurraySummers ACP/MVPs

                      Check this layout -

                       

                      http://gws-sandbox.com/soundscape2.html

                       

                      It will be stable as you add the content below div#header.  Note that there is no positioning used.

                      • 8. Re: Transfering ap divs with their content to another html file
                        adninjastrator Community Member

                        There really should be no need to carry everything from the header over from one page to another just to make the display consistent. If correctly laid out, the design will not shift when you navigate from one page to another..... if it does, there is most likely some margin or padding that is just a little different from one page to another. Of course if you are using AP divs, that could also affect the final display.

                        As for the mp3 player..... noticed you are using a Flash mp3 player.

                        You could use "Flash cookies", local shared objects, to keep the music playing as the visitor navigates from one page to another.

                        From an older post:

                        Local shared object

                        http://kirupa.com/developer/actionscript/shared_objects.htm

                        This tutorial will teach you how to use the Shared Object in Actionscript 2.0. The Shared Object is like a cookie, but it does not require a browser or server-side scripts to use. It is for Flash only and can be loaded instantaneously from the users machine. It is the most efficient way to save information about your users so that they can use it at a later date.

                        Google "Flash local shared objects" for more info.

                        If you don't do Flash, pehaps you could get a friend or Flash developer to add that to the mp3 player.

                        Best wishes,

                        Adninjastrator

                        • 9. Re: Transfering ap divs with their content to another html file
                          jasongreenberg Community Member

                          This looks great, but is this a div?  How do I get this into Dreamweaver?  I'm not good with code, I mostly only work in the design mode so I'm not sure what to do with this...

                          • 10. Re: Transfering ap divs with their content to another html file
                            jasongreenberg Community Member

                            Yes, a guy I'm working with on this is doing the flash so I will pass this on to him as I think this is a solution.

                            Many thanks!

                            • 11. Re: Transfering ap divs with their content to another html file
                              MurraySummers ACP/MVPs

                              I'm not good with code, I mostly only work in the design mode so I'm not sure what to do with this...

                               

                              This will have to change if you don't want to bloody your forehead every day banging it on the desk.

                               

                               

                              is this a div?

                               

                              It's a layout that contains elements (divs, images, forms, tables, etc., along with CSS).

                               

                               

                              How do I get this into Dreamweaver?

                               

                              View source in your browser.  Copy all.  In DW create a new blank HTML page, click in code view, select all and then paste.  You now have it in DW.  Examine the code and the CSS.  See if you can figure out what to do.

                              • 12. Re: Transfering ap divs with their content to another html file
                                jasongreenberg Community Member

                                Thanks again Murray, very much appreciated.  I'll see what I can do.

                                • 13. Re: Transfering ap divs with their content to another html file
                                  MurraySummers ACP/MVPs

                                  Good luck.  I'm sure you will have questions.

                                   

                                  If you can, take note of how I have cleaned up the code....

                                  • 14. Re: Transfering ap divs with their content to another html file
                                    jasongreenberg Community Member

                                    I'm sure I'll have questions too.  I've been banging my head against the wall with this stuff.  I'm not a pro designer, just doing this for my company so can't spend the time learning

                                    everything inside out.  Just learning what I need to get this site done.  I've made some progress so far but haven't been able to get that layout to work with my previous content but I can see how that can work with

                                    new sites moving forward.  Also I can't really tell how you cleaned the code because the code view is like reading greek for me (and I'm not greek).  This forum is a priceless resource, I'm sure I'll be posting here regularly until this site is done.

                                     

                                    Thanks and all the best!