Fork me on GitHub

php home, master, and user files  Bottom

  • Is it possible to replace the home.htm, master.htm, and user.htm with PHP versions in Xanthia? If so, what configuration changes should be made to a Xanthia theme to accomplish this?

    If this is possible, is there a reason NOT to do this? Being something of a newbie to Xanthia, I'm not sure I understand why htm files are used in Xanthia anyway.

    TIA
  • they are just template files and as far as i know, they cant be replaced with PHP files. Which of course would take away the whole idea of seperation of presentation and logic. Why are u wanting to use PHP files? Smarty is pretty powerful and you can use that within your templates when needed.
  • Thank you MACscr! I just needed some reassurance that PHP was at least an option.

    I think I understand the reason for the htm now. Separation of presentation and logic... the same thing that alienated me from ASP when it went .NET! I guess because my stuff is pretty simple, I've never been able to see any benefit to such a seperation. Indeed, I find inline code much more intuitive to create and simpler to debug.

    Cheers!
  • Its just a theme, you dont HAVE to use templates for any module or blocks output. Using Xanthia and templates enables u to cache your themes and with pnrender, it can cache the data output too. Its definately worth it.
  • there's really know good reason to put application logic in with output, apart from the few microseconds you gain in script execution time, which is removed anyway when you cache the output.

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide

This list is based on users active over the last 60 minutes.