Results 1 to 13 of 13
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    8
    [WM-Record cols=1 width=600]
    [WM-If: Field: Main_Category = Brooms & Brushes]
    [/WM-If]
    [WM-Field: TITLE] [WM-Field: MANUFACTURER]<br>
    [/WM-Record]</font></td>

    Above is what I have written for my index page if statement. I have 2 categories. The first is Air Fresheners and the second is Brooms & Brushes. When I run this I am receiving records for Air Fresheners instead of the expected Brooms & Brushes.

    Can anyone tell me what I am doing wrong?

  2. #2
    Full Member
    Join Date
    January 18th, 2005
    Posts
    270
    I think your [/WM-IF] needs to go further down, like just before the [/WM-RECORD]. I believe the IF statement looks at code between the first wm-if and the last /wm-if command.

    Also be sure that the Brooms & Brushes should not be written Brooms_&_Brushes.

    I am not 100% sure of the tips I just gave, but I know I have suffered thru the same issues in the past.

    Goal: $10,000/month by 12/04

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    8
    Thanks Bsnrjones for your help.

    I tried this but when I add [/WM-If] below the Title and Manufacturer fields, I only return one record. Also, I changed the format of my main category to utilize the underscores for spaces. I was hoping that was it, but not so far. Below is my new configuration.

    [WM-Record cols=1 width=600]
    [WM-If: Field: Main_Category = Brooms_&_Brushes]
    [WM-Field: MAIN_CATEGORY]
    [/WM-If]
    [WM-Field: TITLE] [WM-Field: MANUFACTURER]<br>
    [/WM-Record]

    I am really not sure where to place this if statement in the body.

  4. #4
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    Not knowing how your feed is set up could be the close tag need to be just above the close tag for record. That is your title and manufacturer tags need to be inside the If tags.

    It's Your Money. You earned it. What are you going to do to make sure you get to keep it?

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    8
    Thank you Ms. B
    This is not working either. I must be doing something wrong. Does anyone have examples other than the help menus that might show how to place the "If" statement? I'm certain this would help other users besides myself.

  6. #6
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    Is that what your feed basically looks like:

    Brooms_&_Brushes title1 manufacturer1
    Brooms_&_Brushes title2 manufacturer2
    Brooms_&_Brushes title3 manufacturer3
    then repeated for air fresheners

    And is that what you want displayed?

    Brooms & Brushes
    title1 manufacturer1
    title2 manufacturer2
    title3 manufacturer3

    or
    Brooms & Brushes title1 manufacturer1
    Brooms & Brushes title2 manufacturer2
    Brooms & Brushes title3 manufacturer3

    It's Your Money. You earned it. What are you going to do to make sure you get to keep it?

  7. #7
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    If the first output is what you are wanting then you need:

    Brooms & Brushes
    [WM-Record cols=1 width=600]
    [WM-If: Field: MAIN_CATEGORY = Brooms_&_Brushes]
    [WM-Field: TITLE] [WM-Field: MANUFACTURER]

    [/WM-If]
    [/WM-Record]

    It's Your Money. You earned it. What are you going to do to make sure you get to keep it?

  8. #8
    Newbie
    Join Date
    January 18th, 2005
    Posts
    8
    I'm sorry. I just can't seem to get this to work.

    This "If" statement should go on the details template is this correct? If so, where on the page should it be placed? I just created a blank details template with just the minimum amount of information and it is still pulling the wrong data. It's pulling the data from the beginning of the list. instead of the Brooms & Brushes section.

  9. #9
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    I don't know which page MikeOrther. LOL. Depends on where you are wanting the information to show. In your first post you stated index page. It might help for someone to be able to answer your question if we knew exactly where and how you are wanting the information to be displayed.

    It's Your Money. You earned it. What are you going to do to make sure you get to keep it?

  10. #10
    Newbie
    Join Date
    January 18th, 2005
    Posts
    8
    Thanks Ms. B

    I started on the Index page and realized that the detail pages are created first so I switched to Details. Forgot to turn on my blinker.

    Maybe I don’t understand how this works, but I have about 3000 records and I want pages generated for only one category at a time. I have them separated into groups by the Main_Category. The source is an Excel spreadsheet that has 5 columns. Title, Description, Main Category, Manufacturer, and Price. For the sake of this reply, the main category has 2 entries. Air Fresheners and Brooms and Brushes. I am trying to use the "if" statement to create only pages for the Brooms and Brushes category. I am not having much luck though.

    Below is that actual webpage I created for testing. Everything is returned nicely, except the results set is all Air Fresheners instead of Brooms and Brushes.

    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>
    <body>
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%">
    [WM-LinkPrevious]Previous Item[/WM-LinkPrevious]
    [WM-LinkNext]Next Item[/WM-LinkNext]<br>
    <br>
    Brooms & Brushes
    [WM-If: Field: MAIN_CATEGORY = Brooms_&_Brushes]
    [WM-Field: MAIN_CATEGORY]
    [/WM-If]
    <p>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="4">[WM-Field: title]</font><br>
    <img src="[WM-Field: Image_URL]" alt="[WM-Field: Title]" border="0" width="160"><br>
    <br>
    <font size="2"><font face="Arial">[WM-Field: Description]<br>
    <br>
    [WM-Field: TITLE] [WM-Field: [MANUFACTURER]</p>
    <p>
    </td>
    </tr>
    </table>
    </body>
    </html>

  11. #11
    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 MikeOrther:
    I have about 3000 records and I want pages generated for only one category at a time.<HR></BLOCKQUOTE>

    Sort by your category field, using the controls in the Sources tab.

    --
    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

  12. #12
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    See if this gives you what you are looking for. You may need to play with where in the table tags to put the close IF. I've used the table thing in the WM tag. But that should make the records for Brooms and Brushes show.


    &lt;html&gt;
    &lt;head&gt;
    &lt;meta http-equiv="Content-Language" content="en-us"&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
    &lt;title&gt;New Page 1&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"&gt;
    &lt;tr&gt;
    &lt;td width="100%"&gt;
    [WM-LinkPrevious]Previous Item[/WM-LinkPrevious]
    [WM-LinkNext]Next Item[/WM-LinkNext]&lt;br&gt;
    &lt;br&gt;
    Brooms & Brushes
    [WM-If: Field: MAIN_CATEGORY = Brooms_&_Brushes]
    &lt;p&gt;
    &lt;font face="Verdana, Arial, Helvetica, sans-serif" size="4"&gt;[WM-Field: title]&lt;/font&gt;&lt;br&gt;
    &lt;img src="[WM-Field: Image_URL]" alt="[WM-Field: Title]" border="0" width="160"&gt;&lt;br&gt;
    &lt;br&gt;
    &lt;font size="2"&gt;&lt;font face="Arial"&gt;[WM-Field: Description]&lt;br&gt;
    &lt;br&gt;
    [WM-Field: TITLE] [WM-Field: [MANUFACTURER]&lt;/p&gt;
    &lt;p&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    [/WM-If]
    &lt;/table&gt;
    &lt;/body&gt;
    &lt;/html&gt;

    It's Your Money. You earned it. What are you going to do to make sure you get to keep it?

  13. #13
    Newbie
    Join Date
    January 18th, 2005
    Posts
    8
    Thank you Ms B. You have been so helpful.

  14. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. show select products on index page with IF statement
    By sweetiowa in forum WebMerge (Fourthworld.com)
    Replies: 3
    Last Post: October 13th, 2007, 08:30 PM
  2. Index Template Help Needed
    By softserve in forum WebMerge (Fourthworld.com)
    Replies: 3
    Last Post: January 25th, 2006, 11:13 PM
  3. Index Page template
    By PPCguy in forum WebMerge (Fourthworld.com)
    Replies: 10
    Last Post: June 15th, 2004, 07:31 PM
  4. WM-IF statement, only for Index pages?
    By photonstudios in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: February 17th, 2004, 12:52 AM
  5. Index template grayed out
    By Iggy in forum WebMerge (Fourthworld.com)
    Replies: 6
    Last Post: January 7th, 2004, 03:54 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
  •