Results 1 to 15 of 15
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    I'm trying to build a page consisting of a two-column table where each cell contains an index label followed by the items under that index label in my dataset. This requires that I generate a new table row every other time the index label changes. Is there a way to do this? The conditional logic I can find is either applied every time the index label changes or works with the record number.

    Any suggestions (or just letting me know this isn't possible with WebMerge at this time) would be greatly appreciated.

  2. #2
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Forgive my seeling a little slow this eve, but I'm having trouble picturing what you're describing. If you can point me to a page that reflects what you're looking for I'll see if I can accomodate it.

    --
    Richard Gaskin
    Fourth World Media Corporation
    Developer of WebMerge: Publish any database on any site
    ___________________________________________________________
    Ambassador@FourthWorld.com http://www.FourthWorld.com
    Tel: 323-225-3717 AIM: FourthWorldInc

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    I figured out this problem, and am posting the solution in case it is helpful to any users, or suggests enhancements to the program for developers. The goal was to take a dataset of store items organized under a two-level hierarchy like this:

    animals, cats, tabby cat magnet
    animals, cats, black & whited cat magnet
    animals, dogs, terrier magnet
    animals, dogs, poodle magnet
    entertainment, elvis, elvis in gold magnet
    etc.

    and create pages for the top level categories that look like this:

    http://www.funkyfridge.com/animals.html

    To do this I created a settings file and template that first created temporary index pages for each of the second level categories (e.g., the headings and items for cats, dogs, etc. shown on this page as separate index pages). The detail pages in this setting file are the final item pages. I then created a second setting file and template that built the page shown by having the top-level categories be the index pages, and using the FieldInclude feature to pull in the second-level category temporary index pages.

    Since this post I've gone from a newbie to doing some pretty cool stuff with Webmerge. I think one general comment is that a lot of stuff that seems impossible when you first explore this program can be worked around by breaking things down into multiple steps.

  4. #4
    Full Member
    Join Date
    January 18th, 2005
    Posts
    413
    1CNS;

    Very Nice! I think that this may answer one of the issues that I raised in my topic "Lessons Learned in Using WebMerge."

    I'd like to see more of these kind of posts, i.e., ones that discuss a problem and solution and that are visibly demonstrated in a website.

    I've cut an pasted your case study to my WM favorites folder to remind me to try this approach sometime.

    Thanks,

    FRANK
    Baertracks
    Bemorecreative.com

  5. #5
    ABW Ambassador ToughTurkey's Avatar
    Join Date
    January 18th, 2005
    Posts
    993
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> I then created a second setting file and template that built the page shown by having the top-level categories be the index pages, <HR></BLOCKQUOTE>
    I dont understand how you did this step. I am trying to make an index page - not of products (which it intuitively does) - but an index of all my index pages.
    What command am I missing?

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> The basic rule is that a given WebMerge settings file will be well suited for one pair of hierarchical elements, such as index pages and detail pages. If you need multiple hierarchies then you would create a separate settings file for each.

    The trick is to make sure that your pages at each level of the hierarchy are generated using the same naming method. For example, if you want a three-level set of pages, your first settings file creates a list of categories as the index page, linking to a set of empty detail pages. In the second sttings file, your index pages will overwrite the empty pges from the first settings file, with detail pages providing the actual product info.

    Keep in mind that you can queue up multiple settings files to run in a batch (see the Generation tab), so once you're set up you can generate all yur pages with one click.

    <HR></BLOCKQUOTE>
    I found the above to be what I am looking for, but could someone fill in the blanks just a little? or explain it a little differently?

    [This message was edited by ToughTurkey™ on October 27, 2003 at 05:50 PM.]

  6. #6
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    Ditto to Tough Turkey.


    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>I dont understand how you did this step. I am trying to make an index page - not of products (which it intuitively does) - but an index of all my index pages.
    What command am I missing? <HR></BLOCKQUOTE>

    It is a beautiful thing, to do nothing, and then rest afterwards.~Spanish Proverb

  7. #7
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    I tested a way to do multiple levels today and it worked, but there must be an easier way...

    There wasn't a "command" that I found, per se. I don't know if all feeds will cooperate or not...

    It is a beautiful thing, to do nothing, and then rest afterwards.~Spanish Proverb

  8. #8
    ABW Ambassador ToughTurkey's Avatar
    Join Date
    January 18th, 2005
    Posts
    993
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> tested a way to do multiple levels today and it worked, <HR></BLOCKQUOTE>
    did this involve a multiple step process? If it did, i understand the concept, but still need to know some details.

  9. #9
    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 Leader:
    I tested a way to do multiple levels today and it worked, but there must be an easier way...<HR></BLOCKQUOTE>

    I'd like to find it. Perhaps you can help.

    For each page that links to other pages you will need to specify a template and naming criteria. The current method of making multiple settings files may be simplified, but not significantly without losing flexibility.

    Or so it seems to me. What did you have in mind?

    --
    Richard Gaskin
    Fourth World Media Corporation
    Developer of WebMerge: Publish any database on any site
    ___________________________________________________________
    Ambassador@FourthWorld.com http://www.FourthWorld.com
    Tel: 323-225-3717 AIM: FourthWorldInc

  10. #10
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    Here's some more info for Leader and ToughTurkey's questions above, asking for some more detail on how I built pages like this with WebMerge:

    http://www.funkyfridge.com/animals.html

    Don't know if you still have those questions, but maybe somebody else does. These are index pages with links to index pages, as ToughTurkey put it (I have item links there too, but you don't have to include those). First, here's the index template that builds the five subsections of this page as separate temporary index pages.

    [WM-Record][WM-IndexLabel: cat-a1]&lt;h2&gt;&lt;a href="[WM-Field: cat-a2-full-link nolink]" class="nav"&gt;[WM-Field:cat-a2-l1heading nolink]&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;[/WM-IndexLabel][WM-If: IndexRecordNumber &gt; 1]• [/WM-If][WM-FIELD: label raw][/WM-Record]&lt;/h3&gt;

    These index pages are split by changes in cat-a2, or the second-level categories (for example, "Dogs"). Cat-a1 are the top-level catetories (like "Animals").

    A second settings file calls the index template which build this page. It contains a section like this:

    [WM-Record] [WM-IndexLabel: cat-a1] [/WM-IndexLabel] &lt;a href="[WM-Field: cat-a2-full-link]"&gt;&lt;img alt="[WM-Field: cat-a2-heading]" hspace="7" src="images/[WM-Field: cat-a1-link]-[WM-Field: cat-a2-link].jpg" border="0" align="left" vspace="2"&gt;&lt;/a&gt;
    [WM-FieldInclude: cat-a2-full-link raw]
    [WM-If IndexRecordNumber mod 2]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="0%" valign="top"&gt;
    [WM-Else]&lt;/td&gt;&lt;td width="50%" valign="top" align="left"&gt;
    [/WM-If]
    [/WM-Record]

    This time index pages are split by changes in the top-level categories cat-a1, and the command:

    [WM-FieldInclude: cat-a2-full-link raw]

    is pulling in the temporary index pages for the cat-a2 sub-categories (e.g., Dogs, Cats) as chunks of code, and pasting in the five sections you see with links to second-level index pages.

    Finally, a third settings file & template is used to build the second-level pages that you're taken to if you follow those links, creating pages like this:

    http://www.funkyfridge.com/animals-dogs.html

    I know there's still so decifering to do with what I posted here, but I hope this helps.

    To address Richard's question, initially I was hoping that WebMerge could detect changes in a second variable (my second-level category variables) rather than just the one index variable. This should allow pages like this to be generated in one shot.

  11. #11
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    I forgot to mention that the second setting file mentioned above did not work on the original dataset in the format:

    animals, cats, tabby
    animals, cats, black&white
    animals, dogs, beagle
    animals, dogs, golden retriever
    etc.

    so I had to write another process first to generate an "index page" consisting of a comma delmited dataset that had only one record for every second-level category (instead of one record per item). This dataset then served as input to generate the top-level pages (e.g., animals). The original dataset with one record per item served as input to generate the second-level pages (e.g., dogs).

    I'm a fan of WebMerge, but it would be cool to see the capability for nested conditional logic that could respond to changes in multiple variables (categories, usually), something that would make these work-arounds unnecessary.

  12. #12
    ABW Ambassador ToughTurkey's Avatar
    Join Date
    January 18th, 2005
    Posts
    993
    brilliant

    that is extremely helpful.
    cheers

  13. #13
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Fourth World:
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Leader:
    I tested a way to do multiple levels today and it worked, but there must be an easier way...<HR></BLOCKQUOTE>

    I'd like to find it. Perhaps you can help.

    For each page that links to other pages you will need to specify a template and naming criteria. The current method of making multiple settings files may be simplified, but not significantly without losing flexibility.

    Or so it seems to me. What did you have in mind?
    <HR></BLOCKQUOTE>

    I've thought about this for quite a while (since I first got WM and wanted to do categories) and finally came up with this:

    How about another screen...so you have a screen for the Main Index, then a screen for Secondary Indexes. The main index process would automatically make links to all the secondary indexes generated. The secondary indexes would automatically make links to the detail pages (like the regular index pages do now). It'd still need multiple templates, but other than that--one click and presto!

    (I know that only covers 2 levels deep, but you get the idea. )

    As for 1CNS's way, I'm still deciphering that It's not how I did it...

    BTW Richard, on another note, I have some giant text files that aren't delimited (these aren't the typical product feed files). Do you know of a way I could run 'em through WM? It thinks it's all one huge field, of course...

    It is a beautiful thing, to do nothing, and then rest afterwards.~Spanish Proverb

  14. #14
    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 Leader:
    I've thought about this for quite a while (since I first got WM and wanted to do categories) and finally came up with this:

    How about another screen...so you have a screen for the Main Index, then a screen for Secondary Indexes. The main index process would automatically make links to all the secondary indexes generated. The secondary indexes would automatically make links to the detail pages (like the regular index pages do now). It'd still need multiple templates, but other than that--one click and presto!

    (I know that only covers 2 levels deep, but you get the idea. )<HR></BLOCKQUOTE>

    There' the rub: We have a lot of customers with four or more level to their hierarchies. The current method lets you do any number of levels, with only the extra step of saving each to a separate file and attaching it to the batch queue. Maybe I'll change the interface for v3.0 to put something like the queue up front and allow multiple settings to be saved to a single file.

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
    BTW Richard, on another note, I have some giant text files that aren't delimited (these aren't the typical product feed files). Do you know of a way I could run 'em through WM? It thinks it's all one huge field, of course...<HR></BLOCKQUOTE>

    The trick is to identify a pattern that WebMerge could use to break it down into insertable chunks. What does the data look like?

    --
    Richard Gaskin
    Fourth World Media Corporation
    Developer of WebMerge: Publish any database on any site
    ___________________________________________________________
    Ambassador@FourthWorld.com http://www.FourthWorld.com
    Tel: 323-225-3717 AIM: FourthWorldInc

  15. #15
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> The trick is to identify a pattern that WebMerge could use to break it down into insertable chunks. What does the data look like? <HR></BLOCKQUOTE>

    I'll email you a copy of one of the files. It's easier to just show you...

    It is a beautiful thing, to do nothing, and then rest afterwards.~Spanish Proverb

  16. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Artistic Labels / merchant
    By Georgie Peri in forum Rakuten LinkShare - LS
    Replies: 0
    Last Post: January 30th, 2010, 09:05 PM
  2. Nutrition Facts Labels - Do You Read Them?
    By Geno Prussakov in forum Dieting, Fitness & Health
    Replies: 34
    Last Post: April 14th, 2009, 04:13 PM
  3. My Own Labels launches with Google Affiliate Network
    By Google Affiliate Network Moderator in forum Google Affiliate Network - GAN
    Replies: 0
    Last Post: February 4th, 2009, 09:41 PM
  4. Can html index and php index run parallel
    By megatonloh in forum Programming / Datafeeds / Tools
    Replies: 22
    Last Post: April 13th, 2007, 06:55 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
  •