Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Working w/ hyperlinks between local and remote

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #196037
    modiophile
    Participant

    A client of mine has requested an update to their menu. Its not a huge site, but I now have have to update about a dozen pages, and since I have to use relative paths to view my website locally, it becomes a pain updating each page.

    How do you other people work with hyperlinks on their local machine?

    I don’t know PHP, or have a CMS, so easy updates of modules or working in an online environment is not an option for me. Once everything checks out on my desktop, I simply move it into my client’s slice of shared hosting space.

    This issue all stems from the fact that online, what is written as root “/” is not recognized as the “home folder” on my local machine.

    Thanks!

    #196042
    Paulie_D
    Member

    This issue all stems from the fact that online, what is written as root “/” is not recognized as the “home folder” on my local machine.

    It should…assuming the folder structure is the same on the server as it is locally.

    Without actual code it’s hard to help much further.

    #196044
    modiophile
    Participant

    I don’t think so, because the root folder on your desktop is your hard drive root and not that of your project folder unless its somehow explicit. (Maybe Dreamweaver has this functionality, but I work in Brackets and as far as I know this is not an option or extension…)

    #196045
    Paulie_D
    Member

    Why would you be working from the actual base root of your PC?

    Your project files should be in their own project folder.

    Perhaps you need to refactor your project structure?

    As I said… Without code we can’t help.

    #196158
    modiophile
    Participant

    OK, I think the intent of my post is not clear, so let me try to explain further. This isn’t about a specific case, which is why I am only providing theoretical examples. I know how relative links work and I don’t actually work off the root of my local machine when I develop.

    So let’s imagine this is my sitemap:

    <ul>
        <li>Index</li>
        <ul>
            <li>Toys (directory)
                <ul>
                    <li>Baseballs.html</li>
                    <li>YoYos.html</li>
                    <li>Skates.html</li>
                </ul>
            </li>
            <li>Yo-Yo Types (directory)
                <ul>
                    <li>
                        Butterfly (directory)
                        <ul>
                            <li>Freehand</li>
                            <li>Loopers</li>
                        </ul>
                    </li>
                    <li>Imperial</li>
                </ul>
            </li>
        </ul>
    </ul>
    

    On my local machine, if I want to hyperlink from the webpage Loopers.html to Baseballs.html, I have to write the following relative path:

    &lt;a href="../../toys/baseballs.html"&gt;&lt;/a&gt;

    Now if I wanted to accomplish the same thing in a virtual environment (online), all I have to do is type the following path:

    &lt;a href="/toys/baseballs.html"&gt;&lt;/a&gt;

    See the difference? Its much easier to make global updates in a virtual environment because paths don’t have to be relative. You can go straight to the root without traveling back through directories. My intention of this post was to see if there were any solutions out there short of installing a virtual environment on my local machine.

    #196183
    modiophile
    Participant

    That’s correct. And I’m actually on a Mac. A co-worker of mine suggested I check-out MAMP.

    #196225
    modiophile
    Participant

    Already got MAMP up and running multiple websites :) Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.