Changeset 12943 for trunk/gsdl/src/recpt/documentaction.cpp
- Timestamp:
- 2006-09-29T15:32:25+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/documentaction.cpp
r12463 r12943 709 709 // to the archivedir metadata element 710 710 711 // _documentheader_ Custom header info for the specified document 711 712 // must have a valid collection server to continue 712 713 … … 733 734 734 735 metadata.insert ("Title"); 735 736 metadata.insert ("gs.DocumentHeader"); 737 metadata.insert ("DocumentHeader"); 738 736 739 bool fulltoc = false; 737 740 … … 788 791 789 792 disp.setmacro ("header", "document", "_textheader_"); 790 791 793 text_tarray pagetitlearray; 792 794 if (!response.docInfo[0].metadata["Title"].values[0].empty()) … … 823 825 disp.setmacro ("pagetitle", "document", pagetitle); 824 826 827 // custom header info 828 text_t custom_header; 829 if (is_top (arg_d)) { 830 custom_header = response.docInfo[0].metadata["gs.DocumentHeader"].values[0]; 831 if (custom_header.empty()) { 832 // try ex header 833 custom_header = response.docInfo[0].metadata["DocumentHeader"].values[0]; 834 } 835 } else { 836 MetadataInfo_t *parentch = response.docInfo[0].metadata["gs.DocumentHeader"].parent; 837 while (parentch != NULL) { 838 custom_header = parentch->values[0]; 839 parentch = parentch->parent; 840 } 841 if (custom_header.empty()) { 842 // try ex header 843 MetadataInfo_t *parentch = response.docInfo[0].metadata["DocumentHeader"].parent; 844 while (parentch != NULL) { 845 custom_header = parentch->values[0]; 846 parentch = parentch->parent; 847 } 848 } 849 } 850 if (!custom_header.empty()) { 851 disp.setmacro("documentheader", "document", custom_header); 852 } 853 825 854 if (is_top (arg_d)) 826 855 disp.setmacro ("thisOID", displayclass::defaultpackage, dm_safe(response.docInfo[0].metadata["archivedir"].values[0]));
Note:
See TracChangeset
for help on using the changeset viewer.