14 posts
  • Has sold $1+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
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

577 posts Themes and Graphics
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+9 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
  • Has sold $1+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
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.

577 posts Themes and Graphics
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+9 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 :)

1176 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+5 more
Smartik says
by
by
by
by
by
by