Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    January 18th, 2005
    Posts
    99
    How to make absolute links rather than relative
    When WM builds links it is making relative link such as

    href="bluewidget.html"

    I would like to make absolute links such as

    href=http://www.mysite.com/bluewidget.html

    Any ideas?

  2. #2
    Member
    Join Date
    June 6th, 2007
    Posts
    106
    If you are using a scripting language you can insert your domain in each.

  3. #3
    Member
    Join Date
    January 18th, 2005
    Posts
    99
    We are using regular static html pages, nothing fancy. Was hoping there was a WM way to get this result rather than a separate programming solution.

  4. #4
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    What I ended up doing when I needed that, was to use DW's find/replace to stick the absolute part in front of every link on the page. Then I manually took it back away from links that shouldn't have it (like links that go offsite).

    So WM's output is like this:

    Code:
    <a href="some-page.html">Some Page</a>
    I told DreamWeaver to:

    FIND <a href="
    REPLACE WITH <a href="http://www.mysite.com/

    Which resulted in:
    <a href="http://www.mysite.com/some-page.html">

    It's kind of a pain, but it's what I came up with on an "immediate need" basis.
    You should be able to use whatever find/replace program you want (WM may have one. But I'm used to using DW for that so I just automatically do.)
    There is no knowledge that is not power. ~Hemingway

  5. #5
    Member
    Join Date
    January 18th, 2005
    Posts
    99
    Thanks for the above posts.

    What I ended up doing was hard coding the links into the templates rather then having WM create the links. For example

    href=http://mydomain.com/[WM-Field: productname].html

    The only thing that makes this some what problematic is that when WM draws the productname and inserts it into links it replaces spaces with hypens to create a good link. When you use the Field tag in my link as I have it, it does not do this so it is necessary to create a new column in the database and find/replace spaces with hypens and use this column rathers than the raw product name.

  6. #6
    Newbie
    Join Date
    July 23rd, 2008
    Posts
    1

  7. #7
    notary sojac Herb ԿԬ's Avatar
    Join Date
    January 18th, 2005
    Location
    Central/Western NY State
    Posts
    7,741
    Quote Originally Posted by ndehiliyadda
    (didn't work)

  8. #8
    Newbie
    Join Date
    July 11th, 2008
    Location
    Eastern USA
    Posts
    7
    Quote Originally Posted by billbam
    What I ended up doing was hard coding the links into the templates rather then having WM create the links. For example

    href=http://mydomain.com/[WM-Field: productname].html

    The only thing that makes this some what problematic is that when WM draws the productname and inserts it into links it replaces spaces with hypens to create a good link. When you use the Field tag in my link as I have it, it does not do this so it is necessary to create a new column in the database and find/replace spaces with hypens and use this column rathers than the raw product name.

    Can't you do this in your template? (Then you won't have to mangle your data so much):

    [WM-Field: productname raw replace(" ","-")]

    If it's any consolation, I build my links that way you do. I've also observed that I spend A LOT of time in my data file and =CONCATENATE, =LOWER and =SUBSTITUTE have become good friends...

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Relative EPC
    By yintercept in forum Commission Junction - CJ
    Replies: 2
    Last Post: April 10th, 2007, 11:29 PM
  2. Relative of devil
    By itsmelisa in forum Virtual Family and Off-Topic
    Replies: 4
    Last Post: March 16th, 2007, 01:51 PM
  3. Replies: 5
    Last Post: May 1st, 2006, 12:35 PM
  4. PR question: Direct vs. Relative internal links
    By pokerturkey in forum Search Engine Optimization
    Replies: 4
    Last Post: July 22nd, 2005, 11:15 AM
  5. Absolute URL or Root relative - which is best?
    By buy_online in forum Search Engine Optimization
    Replies: 7
    Last Post: August 14th, 2002, 07:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •