- Timestamp:
- 2010-03-03T11:06:37+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/formattools.cpp
r21752 r21758 631 631 formatlistptr->command = comEndLink; 632 632 633 else if (meta == "srclink") { 634 formatlistptr->command = comAssocLink; 635 formatlistptr->meta.metaname = "srclink_file"; 636 metadata.insert("srclink_file"); 637 } 638 else if (meta == "srchref") { 639 formatlistptr->command = comAssocLink; 640 formatlistptr->text = "href"; 641 formatlistptr->meta.metaname = "srclink_file"; 642 metadata.insert("srclink_file"); 643 } 644 else if (meta == "/srclink") { 645 formatlistptr->command = comEndAssocLink; 646 formatlistptr->meta.metaname = "srclink_file"; 647 } 648 // and weblink etc 633 649 else if (meta == "href") 634 650 formatlistptr->command = comHref; … … 1777 1793 return options["link"]; 1778 1794 case comEndLink: 1779 if (options["link"].empty()) return ""; 1795 { 1796 if (options["link"].empty()) return ""; 1780 1797 else return "</a>"; 1798 } 1781 1799 case comHref: 1782 1800 return get_href(options["link"]); … … 1790 1808 case comSummary: 1791 1809 return format_summary(collection, collectproto, docinfo, disp, options, logout); 1792 1810 case comAssocLink: 1811 { 1812 text_t link_filename = get_meta(collection, collectproto, docinfo, disp, formatlistptr->meta, options, logout); 1813 if (!link_filename.empty()) { 1814 text_t href= expand_metadata(options["assocfilepath"]+link_filename, collection, collectproto, docinfo, disp, options, logout); 1815 if (formatlistptr->text == "href") { 1816 return href; 1817 } 1818 return "<a href=\""+ href + "\">"; 1819 } 1820 return ""; 1821 } 1822 case comEndAssocLink: 1823 { 1824 text_t link_filename = get_meta(collection, collectproto, docinfo, disp, formatlistptr->meta, options, logout); 1825 if (!link_filename.empty()) { 1826 return "</a>"; 1827 } 1828 return ""; 1829 } 1793 1830 case comMeta: 1794 1831 {
Note:
See TracChangeset
for help on using the changeset viewer.