Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

combine_files doesn't work in a template


Reply


2 Posts   317 Views

Avatar
thany

Community Member, 6 Posts

25 January 2014 at 4:10am

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.

Avatar
Willr

Forum Moderator, 5513 Posts

29 January 2014 at 9:17pm

Nope you have to use the PHP API for that.