如果您还未将模式调整为匹配可用于 Web 的功能,那么该信息使您可以采取相应的操作。
例如,如果检测到用于创建消息框或新窗口的函数中存在 Web 会话,那么可以调用针对该 Web 环境修改的代码或退出该函数。以下代码示例可用于检测 Web 会话。
dim currDBSession ' Current Db session
set currDBSession = GetSession
' Test for existence of the web session variable.
if currDBSession.HasValue ("_CQ_WEB_SESSION") then
' Either exit or do something else
end if
my $currDBSession; # Current Db session
$currDBSession = $entity->GetSession();
# Test for existence of the web session variable
if ( $currDBSession->HasValue ("_CQ_WEB_SESSION") {
# Either exit or do something else
}