I’m working on my first HTML Site Template for themeforest and wondered what the most common approach is on themeforest for doing include files in straight HTML site templates.
I’ve seen a few thread where PHP includes are suggested – but not sure if that is allowed or the best solution. How open ended is the HTML site templating in this regard?
What does everyone recommend? SSI includes (<!-#include file=”footer.html” ->), PHP includes (<?php include(“footer.php”); ?>) or just static content everywhere?
Thanks, Steve
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Bought between 100 and 499 items
- Europe
- Exclusive Author
- Featured in a Magazine
- Has been a member for 3-4 years
I think I gave a hint to do this a while back, but I can not find the thread again.
The way we use to build html pages is to use php and do the includes of footer and header. When we are finished building the layout, we open the pages in our browser, let us show the source code and copy it into our editor and save it as a .html file. All there is left to do is to replace the pathes with default ones (eg http://localhost/mysite/images/ to images/) etc.
Hope that helps!
Cheers
Bebel
Thanks Bebel,
So you would do the PHP includes while creating the website, but then when finished, turn it back into all static pages?
It seems strange that ThemeForest wouldn’t want the HTML site templates to use includes – but maybe the purpose really for developers to use them as a starting point and to add all their dynamic aspects on top of the HTML template.
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Bought between 100 and 499 items
- Europe
- Exclusive Author
- Featured in a Magazine
- Has been a member for 3-4 years
Yes, that is how we do it. If I do remember correctly, we included both the static html files and php files into the package.
The reason themeforest doesn’t want to have includes on the basic html files is exactly what you said. Some people want to use html instead of php or shtml for their sites. Ruby or Python are just two examples. Some even still use static html websites 
Here is the same question.
http://themeforest.net/forums/thread/if-i-was-to-create-a-theme-/64999