[lp_header_serveHTML]

Description

Link: [lp_header_serveHTML]
Author: Bil Corry
Category: Technical
Version: 8.x
License: Public Domain
Posted: Jan. 20, 2006
Updated: Jan. 01, 0001
More by this author...
Via header, sets content type to serve HTML.  It will force Lasso to send the page in the character set specified in Lasso Admin (default) or use the -encoding param.

Parameters

-encoding string, optional Character set for the page. Default is to use the Lasso default character set.

Sample Usage

lp_header_serveHTML;
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[

define_tag:'lp_header_serveHTML',
	-description='Via header, sets content type to serve HTML.',
	-priority='replace',
	-optional='encoding';

	// internal var that lets other ctags know it's HTML
	var:'_lp_xhtml' = false;
	
	// set encoding
	if: !(local_defined:'encoding');
		local:'encoding' = $__encoding__; // use Lasso default encoding
	/if;	

	// set content type
	content_type: 'text/html; charset=' #encoding;	
	
/define_tag;

]

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular