Results 1 to 5 of 5
  1. #1
    Newbie
    Join Date
    March 2nd, 2006
    Posts
    4
    Replace Function Implemented
    Hi,

    Is this replaced function implemented yet or not?

    Exerpt from below post:
    This would tell WebMerge to process the "[2WM-" tags second; we could also use "[3WM-", "[4WM-" etc. to support any reasonable number of iterations (I'd probably want to limit it to about 8 for simplicity's sake).

    I found the post below today and I see that it's dated almost a year ago and I was wondering if it has been implemented or not.

    Can someone let me know?

    Thank you very much,

    Adam

    Quote Originally Posted by FourthWorld
    That's an interesting usage, one I'd like to support. This won't work today becase WebMerge processes tags from the beginning of the template to the end, so it will attempt to work on the first WM-Field before it gets to the second, but of course we'd need the second one processed first for that to work.

    I have one customer who handles this sort of thing in two pases, in which he has portions of his template stored in his database and uses those to write the templates in the first pass, then process the templates in the second.

    Too much work, in my opinion.

    Far better would be a way to specify processing order. This wouldn't be hard to implement, and could be potentially very powerful.

    The hardest part is simply defining what such a specifier should look like.

    WebMerge looks for tags by searching the template for "[WM-", and then taking action on the remainder when found. So all we need to do is come up with a way of modifying the "[WM-" part to specify the processing order.

    To support your example above, we could use something like:

    [postWM-Field: NAME replace("[WM-Field: MANUFACTURER]","")]

    This would tell WebMerge to process the "[postWM-" tag after it does the others ("post-process").

    Even more flexible would be to provide a number to specify the processing order:

    [2WM-Field: NAME replace("[WM-Field: MANUFACTURER]","")]

    This would tell WebMerge to process the "[2WM-" tags second; we could also use "[3WM-", "[4WM-" etc. to support any reasonable number of iterations (I'd probably want to limit it to about 8 for simplicity's sake).

    Would extending the tag syntax to optionally support processing orders using numbers be acceptable?

    This would of course be fully optional, and all existing templates would continue to work. Any template tag not preceeded with a number would always be processed first.

    Workable? Or could there an even simpler syntax for specifying processing order that I'm overlooking?

  2. #2
    Newbie
    Join Date
    March 2nd, 2006
    Posts
    4
    Anyone?
    Can anybody help me out? Has that replace function been implemented? When I try to use that function, it doesn't work.

  3. #3
    Member MarkJH's Avatar
    Join Date
    January 18th, 2005
    Posts
    68
    Hasn't been implemented Adam but I'm sure Richard will clarify whether or not it's scheduled to be implemented in any future version soon.

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    As a general rule, if it isn't in the documentation it isn't in the product. We have no Replace tag at this time, but we do have a replace option as part of the WM-Field tag. Will that cover what you need for now?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  5. #5
    Newbie
    Join Date
    March 2nd, 2006
    Posts
    4
    The current replace function within a WM tag is cool, but it doesn't allow to replace a word with another WM tag and that's what I need.

    Example:

    [WM-Field: Description replace("string","[WM-Field: Title nolink]")]

    According to a post a post I found a year ago, the work around for this would have been to specify which WM tag should be initiated first (2WM, 3WM, etc..). That's the feature that would totally help me out.

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. WebMerge 2.5 Beta Request Change Case Replace function
    By Sentinel in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: July 16th, 2008, 10:58 AM
  2. How can I replace commas. Replace wont' do it
    By sotonman in forum WebMerge (Fourthworld.com)
    Replies: 8
    Last Post: April 25th, 2007, 04:37 AM
  3. The #@!%&* Search Function
    By Cedric in forum Rakuten LinkShare - LS
    Replies: 5
    Last Post: September 17th, 2002, 03:27 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
  •