1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Including an external file within template

Discussion in 'XenForo Development Discussions' started by XN-Matt, Oct 22, 2010.

  1. XN-Matt

    XN-Matt Member

    Just for a private forum template... is there a way to include an external file from another webserver to parse within the template.

    Also, is there a way to run php commands such as date within the template?
     
  2. Kier

    Kier XenForo Developer Staff Member

    Date processing is handled via the <xen:datetime time="$unixtime"> and {xen:datetime $unixtime} constructs.

    There is currently no way to include an external file in a template unless you write code to do so in a view class.
     
  3. XN-Matt

    XN-Matt Member

    As there isn't much about that around, what if you only want to pull the current year?
     
  4. Kier

    Kier XenForo Developer Staff Member

    You could either do that with javascript in the templates, or you'd need to write some controller code to output it into the $viewParams array passed to the view.
     

Share This Page