Introduced:
The ability to directly edit pages is introduced in OpenCms, because I am not very interested in page editing features, so here's a technical way to share some of the common parsing opencms pages.
Practice: Find the corresponding code for the specified file
For example, we want to analyze the index.html under the/site/default/demo/text-block module in the VFS "Offline" mode.
First, we select the file in workplace, then right-click Properties and switch to the second tab to see the path to the template it uses:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/4A/wKioL1R-g-fCe7j8AAK0wic_Tjs266.jpg "title=" 1.png " alt= "Wkiol1r-g-fce7j8aak0wic_tjs266.jpg"/>
This path is:/system/modules/com.alkacon.bootstrap.formatters/templates/bootstrap-page.jsp
We start a database query, query the Cms_offline_structure table based on this path, and get the corresponding resource_id for that page. The SQL statement is:
SELECT * from cms_offline_structure where resource_path= '/system/modules/com.alkacon.bootstrap.formatters/templates /bootstrap-page.jsp ';
We are looking at the Cms_offline_resources table based on resource_id to get the real page code. The SQL statement is:
SELECT * from cms_offline_contents where resource_id = ' be01129d-1a1a-11e3-9358-000c29f9a2ec ';
You can then open the Blob file to view its contents:
<% @page buffer= "None" session= "false" trimdirectivewhitespaces= "true" %><%----% ><%@ taglib prefix= "CMS" uri= "http://www.opencms.org/taglib/cms" %><%----%> <%@ taglib prefix= "FMT" uri= "http://java.sun.com/jsp/jstl/fmt" %><%----%><% @ taglib prefix= "FN" uri= "http://java.sun.com/jsp/jstl/functions" %><%----%><% @ taglib prefix= "C" uri= "Http://java.sun.com/jsp/jstl/core" %><%----%><fmt: Setlocale value= "${cms.locale}" /><! Doctype html>From here, it is a page composed of a pure JSP plus a CMS tag, and here is just a template.
For the CMS tag library, its URI is "Http://www.opencms.org/taglib/cms", and its corresponding tag library definition is written in the Opencms.tld file.
Details of their own debugging is very clear, here is not an example.
This article is from the "cohesion of parallel Lines" blog, please be sure to keep this source http://supercharles888.blog.51cto.com/609344/1585863
Research on OpenCms page editing mode