14 posts
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Sold between 1 and 100 dollars
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • United States
creativeimprov says

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

548 posts Themes and Graphics
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 100 and 499 items
  • Elite Author
  • Envato Studio (Microlancer) Beta Tester
  • Europe
  • Exclusive Author
+4 more
Bebel says

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

14 posts
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Sold between 1 and 100 dollars
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • United States
creativeimprov says

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.

548 posts Themes and Graphics
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 100 and 499 items
  • Elite Author
  • Envato Studio (Microlancer) Beta Tester
  • Europe
  • Exclusive Author
+4 more
Bebel says

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 :)

1081 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says
by
by
by
by
by
by