Static Pages Installation and Use
Static Pages is installed with the APM like any other package. You
must have the General Comments package installed and mounted to use Static
Pages.
Site-wide Search Setup
One of the most useful features of this package is that it allows
static pages to be searched from the Site-wide Search package.
To use this function:
Install the Site-wide Search package, including support
for the content_revision object
type.
Feed the
static-pages/sql/static-pages-sws.sql file to
the Oracle schema belonging to your ACS installation.
Try it out: scan the file system for static pages, do
exec sws_service.rebuild_all_index
in sqlplus to force the index to rebuild, and
visit the URL where you mounted Site-wide Search.
Site-wide Search performance can sometimes be enhanced by the following
procedure:
In Oracle, build a concatenated index on
acs_contents thus:
create index acs_contents_ctnt_srchable_idx on acs_contents(content_id,searchable_p);
In /packages/site-wide-search/www/search.tcl, insert a hint into the database queries:
set query "select /*+ INDEX(acc acs_contents_ctnt_srchable_idx) */ score(1) as rank, ...
A Brief Tour of Static Pages
Suppose you've got Static Pages installed and mounted at
/statics/. Let's try out each of its
functions.
Use the APM to install and
enable the General Comments and Static Pages packages.
Create a sub-folder (a.k.a. "site node") of the Main Site, named
gc (or whatever you like),
for the General Comments user interface.
Create the "General Comments" application, and mount it at
/gc.
Create a sub-folder of the Main
Site, named static (or
whatever you like), for the Static Pages user interface.
Create the "Static Pages" application, and mount it at
/static.
Put some static pages somewhere under your server's pageroot
(typically /web/service_name/www/). This is
where Static Pages will look for files.
Logged in as an admin, visit /statics/admin/.
The page will assert that "There are 0 static pages
in the system". This is because the filesystem
has not yet been scanned.
Click "Scan filesystem for static
pages". The server will load every
*.html and
*.htm file into the database, which
may take some time if there are many of them. Perform the
filesystem scan again and it will resynchronize the filesystem with
the database, adding, updating, and removing entries from the
content repository as needed.
Return to the admin page and try "Change
permissions". By default, users are allowed
to leave comments on any static page in the system (by following the
"Add a Comment" link at the bottom
of the page), and the full text of the comments will be displayed
one after another at the bottom of the page. These properties may
be changed by toggling the settings displayed with each file. Try
toggling permissions and visiting the corresponding page. You may
need to reload the page for your browser to flush its cache.
Back on the Commentability Designation page, notice that each
directory is
marked "children commentable" or
"children not commentable". When
new static pages are created under the directory, they will
inherit this setting. Toggling this will change the settings of all
descendants. At the bottom of the page is a self-explanatory form
to change the settings of all files containing a given pattern.