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

[Cheetahtemplate-discuss] Error namemapper: not found.

Expand Messages
  • chun ping wang
    Hi everyone, i have a simple problem thats getting sort of complicated. Some site # for $version in $versions $version # end
    Message 1 of 3 , Dec 12, 2006
    • 0 Attachment
      Hi everyone, i have a simple problem thats getting sort of complicated.
       
      <HEAD><TITLE>Some site</TITLE></HEAD>
       <BODY>
       # for $version in $versions
          $version
       # end for
      </BODY>
       
      gives me the output...
      'choose a version v1 v2 v3 
       
      however doing
       
      <HEAD><TITLE>Some site</TITLE></HEAD>
       <BODY>
         #for $version in $versions
              #if $version == $selectedVersion
                  $version
              #end if
         #end for
      </BODY>

      gives me the error:
       
      [Tue Dec 12 16:12:40 2006] [error] [client 192.168.1.1]   File "C:\\Python25\\lib\\site-packages\\Cheetah\\NameMapper.py", line 175, in _raiseNotFoundException\r
      [Tue Dec 12 16:12:40 2006] [error] [client 192.168.1.1]     raise NotFound(excString)\r
      [Tue Dec 12 16:12:40 2006] [error] [client 192.168.1.1] Cheetah.NameMapper.NotFound: cannot find 'version'\r

      What is wrong? how do i use nested variables? Thanks.
    • Lukáš Linhart
      ... Without thinking and at first glance, use # for version in $versions: $version #end for instead. -- Lukáš Linhart ... Take Surveys. Earn Cash. Influence
      Message 2 of 3 , Dec 12, 2006
      • 0 Attachment
        E-mail chun ping wang ze dne Wednesday 13 December 2006 01:15:
        > Hi everyone, i have a simple problem thats getting sort of complicated.
        >
        > <HEAD><TITLE>Some site</TITLE></HEAD>
        > <BODY>
        > # for $version in $versions
        > $version
        > # end for
        > </BODY>
        >
        > What is wrong? how do i use nested variables? Thanks.

        Without thinking and at first glance, use

        # for version in $versions:
        $version
        #end for

        instead.

        --
        Lukáš Linhart
      • Dirk van Oosterbosch, IR labs
        Strange, I tried your code, but that runs fine. The selectedVersions variable is also set? dirk ... Take Surveys. Earn Cash. Influence the Future of IT Join
        Message 3 of 3 , Dec 13, 2006
        • 0 Attachment
          Strange, I tried your code, but that runs fine. The selectedVersions variable is also set?

          dirk


          On 13-dec-2006, at 1:15, chun ping wang wrote:

          Hi everyone, i have a simple problem thats getting sort of complicated.
           
          <HEAD><TITLE>Some site</TITLE></HEAD>
           <BODY>
           # for $version in $versions
              $version
           # end for
          </BODY>
           
          gives me the output...
          'choose a version v1 v2 v3 
           
          however doing
           
          <HEAD><TITLE>Some site</TITLE></HEAD>
           <BODY>
             #for $version in $versions
                  #if $version == $selectedVersion
                      $version
                  #end if
             #end for
          </BODY>

          gives me the error:
           
          [Tue Dec 12 16:12:40 2006] [error] [client 192.168.1.1]   File "C:\\Python25\\lib\\site-packages\\Cheetah\\NameMapper.py", line 175, in _raiseNotFoundException\r
          [Tue Dec 12 16:12:40 2006] [error] [client 192.168.1.1]     raise NotFound(excString)\r
          [Tue Dec 12 16:12:40 2006] [error] [client 192.168.1.1] Cheetah.NameMapper.NotFound: cannot find 'version'\r

          What is wrong? how do i use nested variables? Thanks.

        Your message has been successfully submitted and would be delivered to recipients shortly.