 |  |  |
 |
Common Usage (code fragment from wwwIndex.sqlj)
/*
* showMetaData(int p_level)
* Makes the metadata information for the id page
* This metadata information includes
* - the stylesheets for this page
* - header information (as name, longname, meta tags, and so on
* - Map Information (showMapInfo procedure)
* - Path information (showPath procedure)
* - Related topics for this page (relatedTopics procedure)
*/
public boolean showMetaData(int p_level)
throws SQLException {
int topParent;
if (p_level>1)
topParent=id;
else
topParent = findTopParent();
String topName,topLongName,thisPageName,thisPageLongName,
thisPageComments,thisPagePath,thisPageMeta,thisPagePrintable,
editable,allowAdmin,eMail;
Timestamp lastmod;
try {
Integer thisPageParent;
// Gets information about the top page and the current page
#sql {select name,longname into :topName,:topLongName
from pages where id_page=:topParent};
#sql {select name,longname,comments,parent,path,meta,printable_version,
cms_security.writePermision(p.u_id,g_id,u_write,g_write,o_write),
cms_security.adminPermision(p.u_id,g_id,u_admin,g_admin,o_admin),
modified,u.email
into :thisPageName,:thisPageLongName,:thisPageComments,
:thisPageParent,:thisPagePath,:thisPageMeta,:thisPagePrintable,
:editable,:allowAdmin,:lastmod,:eMail
from pages p, cms_users_view u where id_page=:id and u.u_id=p.modified_by};
Jxtp.tagOpen("header");
Jxtp.tag("name",thisPageName);
Jxtp.tag("title",topName);
Jxtp.tag("subtitle",thisPageLongName);
if (thisPageMeta!=null && !thisPageMeta.equalsIgnoreCase(""))
Jxtp.p(thisPageMeta);
Jxtp.tag("comments",thisPageComments);
Jxtp.tag("urlname",this.name);
Jxtp.tag("urlpath",this.path);
Jxtp.tag("urlext",this.ext);
Jxtp.tag("version",""+this.version);
Jxtp.tag("printable",thisPagePrintable);
Jxtp.tag("editable",editable);
Jxtp.tag("allowAdmin",allowAdmin);
Jxtp.tag("lastmod",lastmod.toString());
Jxtp.tag("email",eMail);
......
|  |
 |  |  |
|