|
|
How to change default width of templateone
This question seems trivial but we spent some time to find a final answer.
Templateone supports 2 different widths: "large" and "small". By default templateone uses the
"large" width (950 pixels).
If you'd like to use the smaller width, simply edit (through opencms administration site) the
file "configuration_css" and set the property "Templatetype" to "small".
How to completely suppress the left navigation boxIn some circumstances, you might want to
completely suppress the left navigation column in order to make more room for content.
I decided that the navigation column should not appear at all when the "Show navigation tree"
option (style_show_navleft) is disabled.
- Through OpenCMS administration interface, navigate to
/system/modules/org.opencms.frontend.templateone/templates/ .
- Make a security copy of "main"
- Edit main's source code
- Locate the following lines:
|
<tr>
<td class="navleft">
<%
// include left
navigation
cms.include(CmsTemplateBean.FOLDER_ELEMENTS +
"nav_left.jsp", null, cms.getProperties());
%></td> |
... replace them with:
|
<tr>
<% if (cms.showLeftNavigation()){
%>
<td
class="navleft">
<%
// include left
navigation
cms.include(CmsTemplateBean.FOLDER_ELEMENTS + "nav_left.jsp", null, cms.getProperties());
%></td>
<%}%> |
You can see an example of a page generated without left naviagtion
here.
Opencms search does not work: Internal server error 500
One of the first things I tried out was to try to enable the search function available in
templateone. Although I created a search index and I verified that the search index was built
correctly, I kept getting an internal server error as soon as I tried to perform a search.
The opecms logfile (WEB-INF/logs/opencms.log) showed the following exception (OpenCMS 6.2):
java.lang.NullPointerException
at
org.opencms.search.CmsSearchParameters.getIndex(CmsSearchParameters.java:230)
at
org.opencms.search.CmsSearch.getSearchResult(CmsSearch.java:422)
at
org.opencms.frontend.templateone.CmsTemplateSearch.getSearchResults(CmsTemplateSearch.java:389)
|
After doing some research, I found out the templateone tells the search engine to perform the
search in an index with the same name as your server's root path (/sites/test is a good example).
In order to solve the issue, I simply created an index called /sites/test and the search
function started working correctly.
You can determine the index name being used on your site by accessing any webpage. Then look
at the source code and search for the following line:
<input type="hidden" name="index" value="/sites/test">
|
|