Include Files and Preview mode best...

User 2325363 Photo


Registered User
5 posts

New guy alert! :cool:

I've been searching the forums and the consensus seems to be that preview mode will not handle SSI include directives.

Is that a true statement?

Like many others I want to re-use pieces of code such as headers, nav menus and footers.
As a new coder I use the preview mode extensively and am not ready to give that up so I am looking for a way to include html files that allow preview mode to work properly.

Any suggestions?

Many Thanks!
Rob.

User 184085 Photo


Ambassador
1,707 posts

My usual plan of attack is to create one page completely, then figure out what bits n' pieces can be broken out into other reusable files.

Then WAMP comes into play, I use wamp to create a local server on my computer so I can use php and ssi.

Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 2325363 Photo


Registered User
5 posts

But unless I am mistaken that doesn't preserve the "preview" capability I desire to keep.
User 184085 Photo


Ambassador
1,707 posts

If you are referring to the preview tab I cannot guarantee that, as I have never used it, but the test in browser options work great :)
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 184085 Photo


Ambassador
1,707 posts

here is a sample of a page that I called index.php and renders in all browsers with WAMP

<div id="main_container" class="curved shadow">
<img src="image_banner/banners/rotate.php" width="800" height="200" alt="Virtual international Flying Club" title="Virtual International Flying Club" />
<div id="menu_box"><?php include("menu/menu.html"); ?></div>
<div id="main_content">
<div id="content_1">
<?php include("content/main_page.html"); ?>
</div> <!-- close content 1 -->
<div id="content_2" class="curved">
<?php include("content/calendar.html"); ?>
<?php include("content/teamspeak.html"); ?>
<?php include("content/vatsim.html"); ?>
</div> <!-- close content 2 -->
</div> <!-- close main content -->
<?php include("footer/footer.php"); ?>
</div> <!-- close main container -->
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 2325363 Photo


Registered User
5 posts

Yes. The preview tab is what I am talking about.
I know that I can upload to my server and test in browser of choice but that is not what I am referring to as that requires extra steps.

just trying to streamline the process.

I appreciate your input and I'll continue to investigate and report back.

Thanks,
Rob
User 122279 Photo


Senior Advisor
14,624 posts
Online Now

As of now php and ssi files cannot be previewed in the HTML Editor. There are future plans of including something that makes it possible to view php files, though. I don't know exactly how they are intending to do it, but some sort of local server will be necessary.

I do as David, use the Wamp server, which is really easy to install, and then I keep at least one browser open for previewing.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.