Putting everything together, you get a BEE Portal Page Model site. Below is a working example:
<html> <head> <script language="bee"> include "portal/portal.bs"; pt = new portal MenuModel="Page"; PortalObjectName = pt; // Useful constants SiteURL = "{pt%SiteURL|pt%convPath:,/}"; // Utility actions switch ('{sys%urlpart:pathpage}') { case '{pt%Subpath}/menuedit.htm': include "portal/menuedit.bs"; break; case '{pt%Subpath}/organizer.htm': include "portal/organizer.bs"; break; } </script> <title>${pt%SiteName}</title> </head> <body> [beept%clientScripts] <h1>Welcome to <a href="${SiteURL}">${pt%SiteName}</a></h1> <h2>Page: ${pt%PageInfo:Name} - ${pt%PageInfo:Description}</h2>
<table width=100%> <tr valign="top"> <td width=25%> ${pt%ListMenu}
<br>
Quick Jump: <select class="field" onChange="window.location = '${pt%Subpath}' + this.options[this.selectedIndex].value"> <bee value="{pt%MenuSelectOptionTags}"> </select>
<form action="${SiteURL}search.htm"> <input class=field type=text name=key size=12> <input class=button type=submit value=Search> </form>
<form method=post action="${SiteURL}index.htm"> <beeaccess> Logged in as ${sys%auth:loginname}<br> <input class="button" type=submit name=Submit value=Logout> <beeelse> Username:<input class="field" type=text name=username size=10><br> Password:<input class="field" type=password name=password size=10><br> <input class="button" type=submit name=Submit value=Login> </beeaccess> </form>
<beeif if="'{pt%AuthStatus}'"> ${pt%AuthMessage} (Error ${pt%AuthStatus}) </beeif>
<br>
<beeaccess "admin"> <a class="pagebaritem" href="javascript:showMenuEditPage()" title="Add, Modify or Delete Menu">Menu Edit</a><br> <a class="pagebaritem" href="javascript:showOrganizer()" title="Add, Copy or Delete Pages or Files">Organizer</a><br> <a class="pagebaritem" target="${MainTarget}" href="${SiteURL}admin/" title="Administer the web site">Admin Site</a><br> </beeaccess> </td> <td width=75% bgcolor=#ffffcc> <script language="bee"> access (lt {pt%PageInfo:AccessLevel}) { display '<span class="error">Please login first</span> '; } else { switch ('{pt%PP}') { case '{pt%Subpath}/menuedit.htm': include "portal/menuedit.htm"; break; case '{pt%Subpath}/organizer.htm': include "portal/organizer.htm"; break; case '{pt%Subpath}/search.htm': include "portal/search.htm"; break; default: text {pt%SP}&{pt%PageHeadingName} leadpath="{pt%Subpath}" default="Under construction" editprompt="Please click this sentence 3 times to enter the Sub-heading."; } } </script> </td> </tr> <tr> <td colspan=2 width=100%> <hr> <table width=100%> <tr> <td width=50%> ${pt%PathMenu} </td> <td width=50% align=right> ${pt%PageBar} </td> </tr> </table> </td> </tr> </table> </body> </html>
Please note that this example is aiming at illustrating the idea and therefore is too much simplified to look attractive. More artwork design is required if you want your site to look more professional. |