[opencms-dev] If titles are too long, how to display only substring of titles?
Huang Zhibin
zbhuang2002 at hotmail.com
Fri Jun 2 07:21:14 CEST 2006
sorry for my carelessness.
I search "substring" in forum and found one page of
http://www.opencms-forum.de/viewtopic.php?t=1669&highlight=substring. so
problem solved.
<cms:contentload collector="allInFolderDateReleasedDesc" 。。。
editable="true">
<c:set var="shortTitle" scope="page"> <cms:contentshow element="Title"
/></c:set>
<%
String strTitle = (String)pageContext.getAttribute("shortTitle");
if(strTitle.length()>15)
strTitle = strTitle.substring(0,14) + "...";
%>
<%=strTitle%>
Zhibin
>From: "Huang Zhibin" <zbhuang2002 at hotmail.com>
>Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
>To: opencms-dev at opencms.org
>Subject: [opencms-dev] If titles are too long,how to display only
substring of titles?
>Date: Fri, 02 Jun 2006 00:51:42 +0000
>
>Dear all,
> Have you met with one problem about displaying titles of one
>directory. If titles are too long, how to display only substring of
>titles? that is how to use function of substring in <cms:contentshow
>element="Title" />?
> Thanks
>Zhibin
>
>
>
>_______________________________________________
>This mail is sent to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please
>visit
>http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list