Results 1 to 6 of 6
  1. #1
    Full Member dak142's Avatar
    Join Date
    January 18th, 2005
    Posts
    386
    Been working on this for 3 hours and I want to go to bed now, maybe someone here will know the answer.

    I am using the below tags, they are for my main index page. The Category tag references the top level category, many of which are more than one word and is creating my problem. For some reason, something to the effect of "%20" is replacing the spaces between the words when what I want to go there is a hypen. This is messing up all my links. The one word links are functioning correctly, because they are one word.

    What do I need to do, I am totally stumped?

    <p>[WM-Record]
    [WM-IndexLabel: Category]<a href="Overstock-Computers-Home-Office/[WM-Field: Category nolink].php" title="[WM-Field: Category nolink]">[WM-Field: Category nolink]</a><br>
    [/WM-IndexLabel]
    [/WM-Record]
    </p>

  2. #2
    ABW Ambassador AWaR's Avatar
    Join Date
    January 18th, 2005
    Location
    Scotland
    Posts
    625
    add replace(" ","-") to the link part... See below<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>&lt;p&gt;[WM-Record]
    [WM-IndexLabel: Category]&lt;a href="Overstock-Computers-Home-Office/[WM-Field: Category nolink replace(" ","-")].php" title="[WM-Field: Category nolink]"&gt;[WM-Field: Category nolink]&lt;/a&gt;&lt;br&gt;
    [/WM-IndexLabel]
    [/WM-Record]
    &lt;/p&gt; <HR></BLOCKQUOTE>what it does is changes the [space] to a hyphen when it finds them. If the merchant uses an underscore, replace the hyphen with that

    _________________________
    "Yesterday we obeyed kings and bent our necks before emperors. But today we kneel only to truth..." - Kahlil Gibran

  3. #3
    Full Member dak142's Avatar
    Join Date
    January 18th, 2005
    Posts
    386
    Ok, that fixed part of my problem, thank you! I am now having problems with "&" and "/". Can I have more than one replace tag in the same line?

    I put three in the same line (one for spaces, one for "&" and one for "/") but only the first replace worked, without editing the feed, what else can I do to make this work?

  4. #4
    ABW Ambassador AWaR's Avatar
    Join Date
    January 18th, 2005
    Location
    Scotland
    Posts
    625
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Dak142:
    Ok, that fixed part of my problem, thank you! I am now having problems with "&" and "/". Can I have more than one replace tag in the same line?
    <HR></BLOCKQUOTE>
    change the replace(" ","-") to replace(" ","-";"&","-";"/","-")

    You can have multiple pair values for replaceing, and each pair must be seperated by a semi-colon ;

    As far as I'm aware, there is no limit on the amount of things you can replace in one pass.

    _________________________
    "Yesterday we obeyed kings and bent our necks before emperors. But today we kneel only to truth..." - Kahlil Gibran

  5. #5
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Dak142:
    Ok, that fixed part of my problem, thank you! I am now having problems with "&" and "/". Can I have more than one replace tag in the same line?

    I put three in the same line (one for spaces, one for "&" and one for "/") but only the first replace worked, without editing the feed, what else can I do to make this work? <HR></BLOCKQUOTE>

    "&" and "/" have special meanings on Web servers, and cannot be used in file names.

    I could add a new attribute for v2.4 which uses character entities instead, but the simplest and most reliable solution is to use a different field containing a unique identifier, such as a product ID field.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  6. #6
    ABW Ambassador buy_online's Avatar
    Join Date
    January 18th, 2005
    Location
    Richmond, VA
    Posts
    3,234
    At this point, I would normally go into Excel and massage it a little (removing the unwanted crap).

    But that's more work.

    Fred

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Spaces
    By Howard Gottlieb in forum Search Engine Optimization
    Replies: 1
    Last Post: July 22nd, 2007, 11:13 PM
  2. Webmerge generating links with spaces?
    By JoeZeppy in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: February 19th, 2006, 01:32 AM
  3. Get rid of blank spaces
    By impact in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: January 24th, 2006, 08:45 PM
  4. problem with spaces in the datafeed
    By photonstudios in forum WebMerge (Fourthworld.com)
    Replies: 7
    Last Post: March 8th, 2004, 03:40 PM
  5. My browser (IE - latest) displays blank affiliate links
    By gagglina in forum Midnight Cafe'
    Replies: 3
    Last Post: September 21st, 2003, 11:05 PM

Posting Permissions

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