Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    April 20th, 2005
    Posts
    112
    WM tags into the Replace attribute!!
    First I like to say that I love WM, it's really a great prog to deal with data feeds, and now to my problem.
    I want to include WM tags into the replace attribute like this:
    [WM-Field: NAME replace("[WM-Field: MANUFACTURER]","")]
    That is not working so how can I change it to work then?

  2. #2
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    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?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  3. #3
    Member
    Join Date
    April 20th, 2005
    Posts
    112
    Well, I think that processing orders using numbers would be really usefull. Looking forward to see it implemented.

    A good navigation option is also something that I'm looking forward to use with numbers or characters. Now I have to re-edit the pages after the WM process.

    What will be the most usefull option in the next release?

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Quote Originally Posted by it2shoes
    Well, I think that processing orders using numbers would be really usefull. Looking forward to see it implemented.
    I'd like to see what others think of the proposed tag extension before I implement it, but it won't take long once I do so it can be in v3.0 if not sooner.

    Quote Originally Posted by it2shoes
    A good navigation option is also something that I'm looking forward to use with numbers or characters. Now I have to re-edit the pages after the WM process.

    What will be the most usefull option in the next release?
    I'm not sure I understand the request. Could I trouble you to elaborate?
    Definitely don't want to see you spending your valuable time hand-editing pages.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  5. #5
    Member
    Join Date
    April 20th, 2005
    Posts
    112
    The naviagation thing is just a linking thing, like this if you view page 1:
    More products ... 1 <a href="p2.html">2</a> <a href="p3.html">3</a> <a href="p4.html">4</a>
    When browsing to a new page the link for the particular page will disapear so it's just the other pages who have the link tag, <a href="...>, included.
    That is one thing I really should be glad I could do with WM.

  6. #6
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Do you have an example page that would show this in action?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  7. #7
    ABW Ambassador Nature Boy's Avatar
    Join Date
    January 18th, 2005
    Location
    Tennessee
    Posts
    1,423
    Quote Originally Posted by FourthWorld
    [2WM-Field: NAME replace("[WM-Field: MANUFACTURER]","")]
    I could use this feature. And I like the 2WM, sweet and simple
    Scott
    If you can't dazzle them with brilliance, then baffle them with bulls#!t
    Don't tell me that you'll do it... SHOW ME.
    Just because everyone else is drinking it is no reason for me to drink the KOOL-AID.

  8. #8
    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?

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Double or Multi Replace tags
    By Jeffrey Zakovec in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: March 16th, 2011, 05:54 PM
  2. Using the title attribute or the alt attribute
    By Julian in forum Midnight Cafe'
    Replies: 12
    Last Post: July 11th, 2008, 02:55 PM
  3. 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
  4. Image alt Attribute
    By John Powell in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: October 26th, 2005, 08:27 AM
  5. Using the replace attribute
    By Primrose in forum WebMerge (Fourthworld.com)
    Replies: 5
    Last Post: October 14th, 2004, 05:30 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
  •