Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

カテゴリ名の表示

適切な場所にカテゴリ名が表示されるよう、トップページのテキストをカスタマイズします。Cookie があり、その Cookie に FilmCategory インスタンスの有効な ID が含まれている場合は、CatName にその FilmCategory インスタンスの CategoryName プロパティの値を割り当てます。

—TopPicks.csp—
TopPicks.csp
<html> <body>
<script language="cache" runat="server"> 
   Set CatID = %request.GetCookie("CacheCinemaLastCategory")
   set CatName = ""
   if (CatID '= "") {
        set Cat = ##class(Cinema.FilmCategory).%OpenId(CatID)
        if (Cat '= "") {
            set CatName = Cat.CategoryName
        }
    }
</script>
<h2><font color="#0000FF">Today's #(CatName)# Top Picks</font></h2>
<table border=0>
<csp:query 
        name=FilmList 
        classname="Cinema.Film" 
        queryname='#(Query)#' P1=#(CatID)#>
<csp:while condition="FilmList.Next()"> ... </csp:while>
</table>
</body> </html>
FeedbackOpens in a new tab