Results 1 to 7 of 7
  1. #1
    Newbie
    Join Date
    March 9th, 2011
    Posts
    10
    how to create subfolders automaticly?
    How does one create sub folders automatically when building the site?

    Automatic is better than doing it all by hand.

    Is there a trick to get this done, because i see no documentation on this.
    I'm not really interested in using a directory index to guide people to the product, that's what Google is for.

    Lets say. we are using gamefly data feed
    jzdomains.com/datafeeds/GameFly_Online_Video_Game_Rentals-Rental_Product_Catalog.txt.gz

    When generating the detail page should the template look some what like this to create folders?

    < a hr ef='[WM-FIELD: THIRDPARTYCATEGORY replace("/"," ")]/[WM-FIELD: ADVERTISERCATEGORY replace("/"," ")]/[WM-FIELD: NAME replace("/"," ")].html'>[WM-FIELD: NAME raw replace("/"," ")]< / a >

    I believe this is the correct format to use to get the result I'm looking for, yes? if not could some one please teach me the correct way to create folders during page generation?

    -Jeff
    Last edited by Jeffrey Zakovec; March 9th, 2011 at 08:28 PM.

  2. #2
    Newbie
    Join Date
    March 9th, 2011
    Posts
    10
    when generating file names on the detail page, can you make it possible to type in fields rather than choose from a drop down list? I think this would be a "WONDERFUL" and quick way to create folders based on datafeed field names. example.

    Here are the fields from a CJ datafeed.
    Code:
    PROGRAMNAME|PROGRAMURL|CATALOGNAME|LASTUPDATED|NAME|KEYWORDS|DESCRIPTION|SKU|MANUFACTURER|MANUFACTURERID|UPC|ISBN|CURRENCY|SALEPRICE|PRICE|RETAILPRICE|FROMPRICE|BUYURL|IMPRESSIONURL|IMAGEURL|ADVERTISERCATEGORY|THIRDPARTYID|THIRDPARTYCATEGORY|AUTHOR|ARTIST|TITLE|PUBLISHER|LABEL|FORMAT|SPECIAL|GIFT|PROMOTIONALTEXT|STARTDATE|ENDDATE|OFFLINE|ONLINE|INSTOCK|CONDITION|WARRANTY|STANDARDSHIPPINGCOST

    instead of choosing one field can you make it so we can "type" in
    something like this: THIRDPARTYCATEGORY/ADVERTISERCATEGORY/MANUFACTURER/NAME.html

    i think this is what needs to be on that page so webmerge can make these folders according to our rules.

    anyone like this idea?

    -Jeff
    Last edited by I.M.O.G.; March 10th, 2011 at 11:27 AM.

  3. #3
    Newbie
    Join Date
    March 9th, 2011
    Posts
    10
    Everyone on vacation?

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    WebMerge will automatically create folders when using the option to name the generated file using data in a specified field if that field has elements separated by "/" characters, e.g.:

    Radios/Grundid/Mini3001

    ...would create a file named "Mini300.html" in a folder "Grundig" which is in a folder "Radios".

    So if you need folder names not already in your feed, one option would be to run that through a database tool to create those values based on on other field values, concatenating them into a string like the one shown above.

    Admittedly, that's a bit of work, and being the automation fan I am I'm intrigued by your suggestion of typing them in manually, and having WebMerge apply them as needed.

    But it's the "as needed" part that I could use some clarification on: How would you specify which files are generated in which folders unless this was done on a record-by-record basis?

    Looking forward to your reply. If we can come up with a good plan here I'd be happy to see what I can do to put it into the program.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  5. #5
    Newbie
    Join Date
    March 9th, 2011
    Posts
    10
    But it's the "as needed" part that I could use some clarification on: How would you specify which files are generated in which folders unless this was done on a record-by-record basis?
    Good Questions. Giving the user a "radio" choice button would or could give the user Four choices, up to three folder drop down choices based on "contents of field" and the last "drop down" being the field choice for file base name.
    Each of these "drop downs" Dir and base name can be found within the proper field choice.
    HTML Code:
    // example 
    $cpd = "create detail pages folder in";
    $subfolder[0] = "field name[0]";
    $basename = "field name";
    [drop]"drop down form tag[/drop];
    $basenameresult = $cpd."/".$subfolder[1]."/".$subfolder[2]."/".$subfolder[3]."/".$basename.".html";
    [ {where to start} "Create Detail Pages In Folder" {then sub folder options} "Drop Down Dir" / "Drop Down Dir" / "Drop Down Dir" / {then basename options} "Drop Down File basename" . html ]
    OR

    HTML Code:
    // example form dirty
    $cpd 
    // subfolder 1
    [drop]fieldname[1][/drop]
    // subfolder 2
    [drop]fieldname[2][/drop]
    // subfolder 3
    [drop]fieldname[3][/drop]
    // basename 1
    [drop]fieldname[4][/drop]
    
    // then  combine all these forms to be one result
    $basename = fieldname[1].'/'.fieldname[2].'/'.fieldname[3].'/'.fieldname[4].'.html';
    I would suggest something like this to get the basename if that's what your program requires to build a detailed page.
    each field is optional except fieldname[4], depending on the users needs.

    An affiliate feed usually has each fieldname filled out based on category, product brand name, product name and so on. depends on the datafeed and what kind of feed it is. but for an affiliate datafeed i feel this would work great.


    hope this helps.
    -Jeff

  6. #6
    Newbie
    Join Date
    March 9th, 2011
    Posts
    10
    can this be a feature?
    Do you think this could be a feature in closer versions of webmerge? One of my projects is on hold, for hopes this could be implemented in the next version.

    Regards,
    -Jeff Zakovec

  7. #7
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    I agree it would be great to be able to add sooner, and I'll see what I can do but at the moment it looks like it'll dovetail nicely with some other enhancements in the works for the version after the next one. I'll explore this a bit further and see what I can come up with.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Does anyone know of a javascript that can automaticly change all subid on a sub site,
    By M.I. Productions in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: October 31st, 2010, 11:25 AM
  2. How Do I Create This Using PopShops
    By iloveshoes in forum PopShops
    Replies: 0
    Last Post: May 5th, 2009, 04:28 PM
  3. How do I create poll at here?
    By zx88 in forum Midnight Cafe'
    Replies: 6
    Last Post: October 8th, 2006, 10:04 PM
  4. One Short Question about subfolders
    By Sophist in forum WebMerge (Fourthworld.com)
    Replies: 1
    Last Post: September 4th, 2004, 05:45 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
  •