Loading ...
Sorry, an error occurred while loading the content.

Re: [Cheetahtemplate-discuss] getVar question

Expand Messages
  • Mike Orr
    ... I just made this mistake last week. getVar looks up only one component, it doesn t handle dotted subcomponents. In this case it s prob ly easiest to
    Message 1 of 4 , Jun 29, 2006
    • 0 Attachment
      On 6/29/06, Bill Mill <bill.mill@...> wrote:
      > Right now, in debugging, I have a template which does this:
      >
      > #for $e in $entries
      > $getVar('e.keywords', 'no keywords')
      > $e.keywords
      > #end for
      >
      > Which prints out "no keywords" followed by the correct list of
      > keywords. What am I not understanding?

      I just made this mistake last week. getVar looks up only one
      component, it doesn't handle dotted subcomponents. In this case
      it's prob'ly easiest to use '#if $e.keywords'.

      --
      Mike Orr <sluggoster@...>

      Using Tomcat but need to do more? Need to support web services, security?
      Get stuff done quickly with pre-integrated technology to make your job easier
      Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
      http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Lukáš Linhart
      ... Is it in plan to fix this behaviour, or, at least, add some $getDottedVar() function? I think this is so common use-case that it should be solved. --
      Message 2 of 4 , Dec 10, 2006
      • 0 Attachment
        E-mail Mike Orr ze dne Thursday 29 June 2006 20:13:
        > On 6/29/06, Bill Mill <bill.mill@...> wrote:
        > > Right now, in debugging, I have a template which does this:
        > >
        > > #for $e in $entries
        > > $getVar('e.keywords', 'no keywords')
        > > $e.keywords
        > > #end for
        > >
        > > Which prints out "no keywords" followed by the correct list of
        > > keywords. What am I not understanding?
        >
        > I just made this mistake last week. getVar looks up only one
        > component, it doesn't handle dotted subcomponents. In this case
        > it's prob'ly easiest to use '#if $e.keywords'.

        Is it in plan to fix this behaviour, or, at least, add some $getDottedVar()
        function?

        I think this is so common use-case that it should be solved.

        --
        Lukáš Linhart

        -------------------------------------------------------------------------
        Take Surveys. Earn Cash. Influence the Future of IT
        Join SourceForge.net's Techsay panel and you'll get the chance to share your
        opinions on IT & business topics through brief surveys - and earn cash
        http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Mike Orr
        ... Tavis will have to answer that. He should be popping in soon. -- Mike Orr ... Take Surveys. Earn Cash. Influence the Future of IT
        Message 3 of 4 , Dec 10, 2006
        • 0 Attachment
          On 12/10/06, Lukáš Linhart <almad@...> wrote:
          > E-mail Mike Orr ze dne Thursday 29 June 2006 20:13:
          > > On 6/29/06, Bill Mill <bill.mill@...> wrote:
          > > > Right now, in debugging, I have a template which does this:
          > > >
          > > > #for $e in $entries
          > > > $getVar('e.keywords', 'no keywords')
          > > > $e.keywords
          > > > #end for
          > > >
          > > > Which prints out "no keywords" followed by the correct list of
          > > > keywords. What am I not understanding?
          > >
          > > I just made this mistake last week. getVar looks up only one
          > > component, it doesn't handle dotted subcomponents. In this case
          > > it's prob'ly easiest to use '#if $e.keywords'.
          >
          > Is it in plan to fix this behaviour, or, at least, add some $getDottedVar()
          > function?

          Tavis will have to answer that. He should be popping in soon.

          --
          Mike Orr <sluggoster@...>

          -------------------------------------------------------------------------
          Take Surveys. Earn Cash. Influence the Future of IT
          Join SourceForge.net's Techsay panel and you'll get the chance to share your
          opinions on IT & business topics through brief surveys - and earn cash
          http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        Your message has been successfully submitted and would be delivered to recipients shortly.