diff --git a/productMods/WEB-INF/ontologies/app/application.owl b/productMods/WEB-INF/ontologies/app/application.owl index 33e900fb..4cc0d70a 100644 --- a/productMods/WEB-INF/ontologies/app/application.owl +++ b/productMods/WEB-INF/ontologies/app/application.owl @@ -1,319 +1,97 @@ - - - + - - - - - + + + + + ]> + + + + + + + + + + + This represents a menu item or other general navigation item. + + + + + + + + + + + + + + + + + + + + + + Indicates that a page requires a body template. + + + + + + + + + Values from HttpRequest.getPathInfo() will be mapped to values from urlMapping. + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - Vitro display ontology - 1.1 - - - - - - - - - - - - - - - - - - - - - requires values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Java Class Name - Java package and class name. ex edu.cornell.mannlib.vitro.webapps.functions.ExampleFunction - - - - - - - - menu position - - - - - - - - parameter name - - - - - - - - parameter value - - - - - - - - Body Template - Indicates that a page requires a body template. - - - - - - - - - title - Value for HTML title element. - - - - - - - - - Values from HttpRequest.getPathInfo() will be mapped to values from urlMapping. - - - - - - - - - - - - - - - - - - - - Navigation Element - This represents a menu item or other general navigation item. - - - - - - - - Page - Class of pages. - - - - - - - - - - - - Externally Linked Namespace - - - - - - - - - - - - - - - - - - - - - - - - - - - - Home - home.ftl - /home - - - - - - - - - - - - - - - - - - - edu.cornell.mannlib.vitro.webapp.valuemap.HomeValueMap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/productMods/WEB-INF/ontologies/app/vivoDefaultMenu.n3 b/productMods/WEB-INF/ontologies/app/vivoDefaultMenu.n3 new file mode 100644 index 00000000..928d4c17 --- /dev/null +++ b/productMods/WEB-INF/ontologies/app/vivoDefaultMenu.n3 @@ -0,0 +1,80 @@ +# $This file is distributed under the terms of the license in /doc/license.txt$ + +@prefix owl: . +@prefix display: . +@prefix rdf: . +@prefix core: . + + +### This file defines the default menu for vivo. ### + +#### Default Menu #### + +display:DefaultMenu + a display:MainMenu ; + display:hasElement display:EventsMenuItem ; + display:hasElement display:HomeMenuItem ; + display:hasElement display:OrganizationsMenuItem ; + display:hasElement display:PeopleMenuItem ; + display:hasElement display:PublicationsMenuItem . + +#### Menu Items for Default Menu #### + +display:HomeMenuItem + a display:NavigationElement ; + display:menuPosition 1; + display:linkText "Home"; + display:toPage display:Home . + +display:PeopleMenuItem + a display:NavigationElement ; + display:menuPosition 2; + display:linkText "People"; + display:toPage display:People . + +display:PublicationsMenuItem + a display:NavigationElement ; + display:menuPosition 3; + display:linkText "Publications"; + display:toPage display:Publications . + +display:EventsMenuItem + a display:NavigationElement ; + display:menuPosition 4; + display:linkText "Events"; + display:toPage display:Events . + +display:OrganizationsMenuItem + a display:NavigationElement ; + display:menuPosition 5; + display:linkText "Organizations"; + display:toPage display:Organizations . + +########## Pages ############ + +display:Home + a display:HomePage ; + a display:Page ; + display:title "Home" ; + display:urlMapping "/home" . + +display:Events + a display:Page ; + display:title "Events" ; + display:urlMapping "/events" . + +display:Organizations + a display:Page ; + display:title "Organizations" ; + display:urlMapping "/organizations" . + +display:People + a display:Page ; + display:requiresBodyTemplate "menupage--classgroup-people.ftl" ; + display:title "People" ; + display:urlMapping "/people" . + +display:Publications + a display:Page ; + display:title "Publications" ; + display:urlMapping "/publications" . diff --git a/productMods/WEB-INF/web.xml b/productMods/WEB-INF/web.xml index d78e2410..85419453 100644 --- a/productMods/WEB-INF/web.xml +++ b/productMods/WEB-INF/web.xml @@ -270,6 +270,16 @@ /* + + PageRoutingFilter + edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter + + + PageRoutingFilter + /* + request + + + fetch diff --git a/productMods/templates/freemarker/body/menupage/publications.ftl b/productMods/templates/freemarker/body/menupage/publications.ftl new file mode 100644 index 00000000..62728b1e --- /dev/null +++ b/productMods/templates/freemarker/body/menupage/publications.ftl @@ -0,0 +1,24 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +

This body is from the the template file + vivo/productMods/templates/freemarker/body/menupage/publications.ftl. + In the display model, the publications page has a display:requiresBodyTemplate + property that defines that the publications page overrides the default template. + The default template for these pages is at /vitro/webapp/web/templates/freemarker/body/menupage/menupage.ftl

+ +

This technique could be used to define pages without menu items, that get + their content from a freemarker template. An example would be the about page.

+ + +display:About
+ a display:Page ;
+ display:requiresBodyTemplate "about.ftl" ;
+ display:title "About" ;
+ display:urlMapping "/about" .
+
+
+ +

This would create a page that would use about.ftl as the body. The page would be +accessed via /about and would override all servlet mappings in web.xml

+ + \ No newline at end of file