source: trunk/gsdl/src/recpt/pageaction.cpp@ 266

Last change on this file since 266 was 266, checked in by sjboddie, 25 years ago

navigation bar is no longer written out for every page (it should
be included in the _content_ macro of pages wanting to display it).

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/**********************************************************************
2 *
3 * pageaction.cpp --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
6 * PUT COPYRIGHT NOTICE HERE
7 *
8 * $Id: pageaction.cpp 266 1999-06-10 00:39:16Z sjboddie $
9 *
10 *********************************************************************/
11
12/*
13 $Log$
14 Revision 1.6 1999/06/10 00:39:16 sjboddie
15 navigation bar is no longer written out for every page (it should
16 be included in the _content_ macro of pages wanting to display it).
17
18 Revision 1.5 1999/06/08 04:29:35 sjboddie
19 added argsinfo to the call to check_cgiargs to make it easy to set
20 args to their default if they're found to be screwed up
21
22 Revision 1.4 1999/02/28 20:00:14 rjmcnab
23
24
25 Fixed a few things.
26
27 Revision 1.3 1999/02/25 21:58:58 rjmcnab
28
29 Merged sources.
30
31 Revision 1.2 1999/02/21 22:33:54 rjmcnab
32
33 Lots of stuff :-)
34
35 Revision 1.1 1999/02/12 02:40:17 sjboddie
36
37 Added page action
38
39 */
40
41
42#include "pageaction.h"
43#include "receptionist.h"
44
45
46pageaction::pageaction () {
47 // this action uses cgi variables "a" and "p"
48 cgiarginfo arg_ainfo;
49 arg_ainfo.shortname = "a";
50 arg_ainfo.longname = "action";
51 arg_ainfo.multiplechar = true;
52 arg_ainfo.defaultstatus = cgiarginfo::weak;
53 arg_ainfo.argdefault = "p";
54 arg_ainfo.savedarginfo = cgiarginfo::must;
55 argsinfo.addarginfo (NULL, arg_ainfo);
56
57 arg_ainfo.shortname = "p";
58 arg_ainfo.longname = "page";
59 arg_ainfo.multiplechar = true;
60 arg_ainfo.defaultstatus = cgiarginfo::weak;
61 arg_ainfo.argdefault = "about";
62 arg_ainfo.savedarginfo = cgiarginfo::can;
63 argsinfo.addarginfo (NULL, arg_ainfo);
64}
65
66pageaction::~pageaction () {
67}
68
69bool pageaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &/*args*/,
70 ostream &/*logout*/) {
71 // don't want to check anything yet.
72 return true;
73}
74
75void pageaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response,
76 text_t &response_data, ostream &/*logout*/) {
77 response = content;
78 response_data = "text/html";
79}
80
81bool pageaction::do_action (cgiargsclass &args, recptproto */*collectproto*/,
82 displayclass &disp, outconvertclass &outconvert,
83 ostream &textout, ostream &/*logout*/) {
84
85 text_t &arg_p = args["p"];
86
87 textout << outconvert << disp << ("_" + arg_p + ":header_\n")
88 << ("_" + arg_p + ":content_\n")
89 << ("_" + arg_p + ":footer_\n");
90
91 return true;
92}
Note: See TracBrowser for help on using the repository browser.