SiteXpert FAQ

Question ID:
Q1018
Question:
How can I insert output from SiteXpert into multiple existing pages?
 
With SiteXpert 6, this is a very easy task. There are three ways to do this:
Method 1: Using Web Site Navigation Manager (Professional Edition only)
This is the best method because it allows inclusion of menus and site maps on multiple web pages and doesn't require server-side processing (such as ASP or PHP) although it optionally takes advantage of server-side processing by generating outputs in the format of ASP, PHP, etc. However, this method also generates regular HTML files.
To include outputs on existing pages using WNM, create a new output page with output type set to: "Modify existing HTML documents" or "Create multiple HTML documents". You can set the include style in output page properties window. Include style can be one of the following:
  • No include -- generates a regular HTML page
  • PHP include
  • ASP include
  • JSP include
  • SSI (server side include)
  • Front Page Template
  • ColdFusion Template
Please refer to the Help and Tutorial files for Web Site Navigation Manager for details.
Method 2: Using server-side includes (PHP, ASP, SSI, JSP, FrontPage or ColdFusion)
This method allows inclusion on multiple web pages. However, it requires server-side processing (such as PHP, ASP, JSP) and cannot be used to create regular HTML files.
Step 1. Create site map's structure and set all options (e.g. choose scheme in Options / Schemes)
Step 2. Go to Options / Output and set output format to the desired inclusion method (e.g. PHP). You can choose between: PHP, ASP, SSI, JSP, FrontPage or ColdFusion includes but this method will work with any other server-side inclusion technique. Also, make sure you set all the other output directories in this window.
Step 3. Click 'Generate' on the tool bar. This will create the main file (e.g. PHP) and two include files (e.g. sitemap_head.inc and sitemap_body.inc). Now, to include this output (e.g. menu or site map) on existing pages, you must copy these include (.inc) files to your webserver, e.g. to the /include subdirectory.
Step 4. In all your pages where you want the menu included, simply enter two inclusion commands: one should include the file 'head_xxx.inc' (e.g. head_sitemap.inc) anywhere in the head section of the page, and one should include the file 'body_xxx.inc' (e.g. body_sitemap.inc) in the body section of the page (wherever you want the output to appear on your web page). For example, for PHP inclusion, the inclusion commands should be: <? include ("/include/head_sitemap.inc") ?>
and
<? include ("/include/body_sitemap.inc") ?>
If you used another inclusion method (e.g. ASP, or SSI includes instead of PHP), the tags have a different format, but the same as the generated output file by SiteXpert (e.g. sitemap.asp), so you can open this file and copy/paste the include lines (remember to change the paths to absolute paths, e.g. "body_sitemap.inc" to "/include/body_sitemap.inc")
Method 3: Using a template file
Please note: this method will only work if you want to include a menu / site map into a single, existing, web page. Because of these limitations, we would suggest using method 1 or method 2.
If you want to insert a sitemap / menu into a web page using this method, you need to create a template file by inserting two SiteXpert-specific tags into your existing page: <!--include-sitemap-head--> somewhere in the head section of the page, and: <!--include-sitemap-body--> somewhere in the body section of the page (wherever you want the output from SiteXpert to appear). Now, your page with these two tags is automatically considered a template file by SiteXpert. Now, you need to set the location of this template file in Options / Content / Use Template File. After clicking on the Generate button on the toolbar, the output page will contain a site map / menu embedded into the template file at the position specified by the <!--include-sitemap-body--> tag.