9 Replies Latest reply on May 22, 2012 1:06 AM by Liam Dilley

    Appropriate Linking and Folder Structure in BC

    Tarik :: Creativaholic Level 3

      This might be an outdated question but I think if it is answered, it will help all newbies to BC. Not that I have an issue, but I just want to re-confirm something avoiding any broken links in the future by surprise.

       

      I explained this in the basic manner possible so we're clear about what we talk about. There is a question though in the end.

       

      Let's take a basic site structure:

       

      Root Folder

      (All BC Folders - let's not worry about those now)


      index.html

       

      Assets [Directory]

      images [Directory]

      img1.jpg

      img2.jpg

       

      stylesheets [Directory]

      mystylesheet.css

       

      Information [Directory]

      About.html

       

       

      Now in the usual way we learnt "old school":

       

      1. If you have img1.jpg inserted in the About.html, it will be <img src="../Assets/images/img1.jpg"
      2. If you have the image inserted in the index.html, it will be <img src="Assets/images/img1.jpg"
      3. In the CSS, if you have an image background, you will do, .class { background: url(../Assets/images/img2.jpg) no-repeat; }

       

      NOTICE THE "../" before "Assets" to browse a directory back.

       

      ------------------------------

       

      Situation:

       

      In Dreamweaver, these paths work just fine obviously and so in BC, except that in BC you can also link as follows:

       

      1. <img src="/Assets/images/img1.jpg"
      2. .class { background: url(/Assets/images/img2.jpg) no-repeat ....; }

       

      NOW NOTICE THAT THE ".." before the slashe is not there. And for the index.html, we'll add the slash.

       

      This is still working fine somehow.

       

       

      But the question is, are those both methods work with BC? or is there something we need to know about?