Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Variables

  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Variables

    Hi Guys,

    I am newbie, so please tolerate my very basic question.

    I have this loop

    Code:
    <b:if cond='data:post.labels'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:label.name == &quot;Software&quot;'>
    Yes software tag is present
    <b:else/>
    No software tag is not present
    </b:if>
    <b:if cond='data:label.isLast != &quot;true&quot;'/>
    </b:loop>
    </b:if>
    In this loop, I am searching for 'Software' tag in the post. If it is found i want that a flag should be set to indicate that. How to create a temporary variable and set and rerieve value from it?

    Please help

  • #2
    Yay
    Yay is offline
    Regular Coder Yay's Avatar
    Join Date
    Oct 2008
    Location
    54° North, 1° West
    Posts
    102
    Thanks
    9
    Thanked 1 Time in 1 Post
    Does your code have a declaration? Please post the whole code and read the rules of the XML forum.

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by newbiedev View Post
    Hi Guys,

    I am newbie, so please tolerate my very basic question.

    I have this loop

    Code:
    <b:if cond='data:post.labels'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:label.name == &quot;Software&quot;'>
    Yes software tag is present
    <b:else/>
    No software tag is not present
    </b:if>
    <b:if cond='data:label.isLast != &quot;true&quot;'/>
    </b:loop>
    </b:if>
    In this loop, I am searching for 'Software' tag in the post. If it is found i want that a flag should be set to indicate that. How to create a temporary variable and set and rerieve value from it?

    Please help
    what language do you use? as Yay said, post whole code. As it look now I don't have any clue what's there.

    regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •