NetTalk Central

Author Topic: _sendFile how??  (Read 4677 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
_sendFile how??
« on: June 05, 2014, 04:31:42 AM »
i have this code in _sendFile in webhandler :
 
and in my indexpage XHtml Location after body but dont work.

<!-- Net:PageHeaderTag -->
<!-- Net:f:xmain -->
<!-- Net:PageFooterTag -->


! [Priority 5000]
   
    !Change include files based on language
    CASE( SELF.GetPageName(UPPER( p_FileName )))
 
    OF 'XHEADER'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Header_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Header_Spanish.html'
      END !CASE
 
    OF 'XHEADER1'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Test_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Test_Spanish.html'
      END !CASE
 
    OF 'XMAIN'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Main_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Main_Spanish.html'
      END !CASE
        message(SELF.GetPageName(UPPER( p_FileName )))
        
    OF 'XFOOTER'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Footer_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Footer_Spanish.html'
      END !CASE
 
    OF 'XREGWIZTAB2' OROF 'XREGWIZTAB3'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\RegWiz2_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\RegWiz2_Spanish.html'
      END !CASE
 
    OF 'XLOCATIONS'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Locations_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Locations_Spanish.html'
      END !CASE
       
    OF 'XSPECIALOFFERS'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Specials_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Specials_Spanish.html'
      END !CASE
 
    OF 'XREGISTR'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Regis_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Regis_Spanish.html'
      END !CASE
 
    OF 'XMESSAGE'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Captcha_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Captcha_SPanish.html'
      END !CASE
 
      OF 'XMESSAGER'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Captcha_EnglishR.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Captcha_SPanishR.html'
      END !CASE 
 
    OF 'XTEST'
      CASE SELF.GSV( 'LANG' )
      OF 'ENGLISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Test_English.html'
      OF 'SPANISH'
        p_FileName = CLIP( LONGPATH( PATH())) & '\Web\Test_Spanish.html'
      END !CASE
 
    END !CASE

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: _sendFile how??
« Reply #1 on: June 05, 2014, 06:41:18 AM »
I think you will need to tweak an example app to show the effect you are after, and then post that here.

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: _sendFile how??
« Reply #2 on: June 05, 2014, 07:14:29 AM »
is a private project how i can send app to your email..

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: _sendFile how??
« Reply #3 on: June 05, 2014, 12:33:04 PM »
small demo... in NT5 work.

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: _sendFile how??
« Reply #4 on: June 06, 2014, 04:12:54 AM »
the Net:F tag is not loaded by SendFile. It is loaded in _HandleTag.
So if you want to alter the tag itself (in this case from say f:xmain to f:mainspanish.html
then you need to do it there, before the parent call.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: _sendFile how??
« Reply #5 on: June 07, 2014, 03:45:16 AM »
i don't is correct but working for me in HandleTag:
Thanks

CASE  UPPER(p_TagString )

OF 'F:XHEADER'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Header_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Header_Spanish.html',0)
   END

OF 'F:XHEADER1'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Test_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Test_Spanish.html',0)
   END

OF 'F:XMAIN'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Main_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Main_Spanish.html',0)
   END

OF 'F:XFOOTER'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Footer_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Footer_Spanish.html',0)
   END

OF 'F:XREGWIZTAB2' OROF 'F:XREGWIZTAB3'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\RegWiz2_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\RegWiz2_Spanish.html',0)
   END

OF 'F:XLOCATIONS'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Locations_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Locations_Spanish.html',0)
   END
     
OF 'F:XSPECIALOFFERS'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Specials_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Specials_Spanish.html',0)
   END

OF 'F:XREGISTR'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Regis_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Regis_Spanish.html',0)
   END

OF 'F:XMESSAGE'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Captcha_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Captcha_SPanish.html',0)
   END

OF 'F:XMESSAGER'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Captcha_EnglishR.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Captcha_SPanishR.html',0)
   END   

OF 'F:XTEST'
   CASE SELF.GSV( 'LANG' )
   OF 'ENGLISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Test_English.html',0)
   OF 'SPANISH'
      self._SendFile( CLIP( LONGPATH( PATH())) & '\Web\Test_Spanish.html',0)
   END
END

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: _sendFile how??
« Reply #6 on: June 07, 2014, 05:34:56 AM »
it would be better to simply call the parent with a different tag than to do a _SendFile from there.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: _sendFile how??
« Reply #7 on: June 07, 2014, 05:57:24 AM »
sorry Bruce  but didn't understand anything...