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

826Re: {include file assign} / {input...} issues

Expand Messages
  • Shekar C. Reddy
    Dec 11, 2006
    • 0 Attachment
      Thanks for clarifying that, Manuel. It is clear now as to how the form
      object composes the form output. I guess we can live with multiple
      templates for forms and non-forms.

      Regards,




      --- In forms-dev@yahoogroups.com, Manuel Lemos <mlemos@...> wrote:
      >
      > Hello,
      >
      > on 11/30/2006 12:52 PM Shekar C. Reddy said the following:
      > > Sorry again for typing wrong code, Manuel - because I could not copy
      > > it from my code as I was away from my machine. Yes, the operator
      > > used is ' == ' with spaces on its either side. It bombs with:
      > >
      > > syntax error: unrecognized tag 'input' (Smarty_Compiler.class.php,
      > > line 580)
      > >
      > > However, the following code works by properly skipping the line that
      > > attempts to render $page.xx var if the $page.type is != 'form' as
      > > there is no var with the name $page.xx:
      > >
      > > {if $page.type == 'form'}
      > > {$page.xx}
      > > {/if}
      > >
      > > For sometime, I thought it was Smarty compiler's problem with the
      > > {if} tag rendition but later noticed it works with the non-existent
      > > $page.xx var but does not work with the input tag. Input tag works
      > > (or gets skipped) only if the forms class is instantiated. Another
      > > thing I noticed is, if I include the input tags using a separate
      > > template file, it works/skips if page.type is != form. So far, the
      > > best workaround I found is to use different templates for forms-
      > > based and non-forms based pages where non-forms based pages do not
      > > instantiate the forms class and its templates do not have any
      > > references to input tags.
      >
      > Of course, when you use the forms class plug-in you must have created a
      > a form object so it composes the form output. The Smarty plug-in for
      > the forms class always calls the class to add data parts even when there
      > are no inputs. So either you use the forms class to compose the output
      > or you don't.
      >
      >
      > --
      >
      > Regards,
      > Manuel Lemos
      >
      > Metastorage - Data object relational mapping layer generator
      > http://www.metastorage.net/
      >
      > PHP Classes - Free ready to use OOP components written in PHP
      > http://www.phpclasses.org/
      >
    • Show all 22 messages in this topic