Jump to:

3444 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » combine_files doesn't work in a template

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 244 Views
  • thany
    Avatar
    Community Member
    6 Posts

    combine_files doesn't work in a template Link to this post

    So I tried this:

    <% require combine_files("style.css", array(
    "$themeDir/css/reset.css",
    "$themeDir/css/lightbox.css",
    "$themeDir/css/fonts.css",
    "$themeDir/css/form.css"
    )) %>


    Doesn't work. It spews out a warning:
    [Warning] Invalid argument supplied for foreach()

    And of course doesn't include the files. Turns out the array is passed as a a string, e.g. "array". Literally.

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: combine_files doesn't work in a template Link to this post

    Nope you have to use the PHP API for that.

    244 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.