[b]When using <cmsu:simpleSearch> and <cmsu:searchResultSnippet> links are not 
displayed properly.[/b]

This is my code:
[code]
<c:if test="${!empty param.contentSearchPattern}">
        <h1>xx results for "${fn:escapeXml(param.contentSearchPattern)}"</h1>
        <ol>
                <cmsu:simpleSearch query="${param.contentSearchPattern}" 
var="results" startLevel="1" />
                <c:if test="${empty results}">
                        <p>No results</p>
                </c:if>
                <c:forEach var="node" items="${results}">
                        <li>
                                <h2><a 
href="${pageContext.request.contextPath}${node.handle}.html">${node.title}</a></h2>
                                <p 
class="pageResultUrl">drintranet-testdev${node.handle}.html</p>
                                <p><cmsu:searchResultSnippet 
query="${param.contentSearchPattern}" page="${node}" chars="120"/></p>
                        </li>
                </c:forEach>
        </ol>
</c:if>
[/code]

So let's say I have a page matching the search pattern, it'll display the 
snippet correctly if this is text only. But if the text matching the pattern is 
a link it will display the snippet such as "<urlOfTheLink><textOfTheLink>" with 
<textOfTheLink> not being linked anymore. 

[u]I would like to be able to keep the same format. ie. if a text is also a 
link, display the text with the link.[/u]



[b]Also, when using <cmsu:simpleSearch> and <cmsu:searchResultSnippet> I want 
to display the date the page/article was created.[/b]

Here is the code:

[code]
<c:if test="${!empty param.contentSearchPattern}">
        <h1>xx results for "${fn:escapeXml(param.contentSearchPattern)}"</h1>
        <ol>
                <cmsu:simpleSearch query="${param.contentSearchPattern}" 
var="results" startLevel="1" />
                <c:if test="${empty results}">
                        <p>No results</p>
                </c:if>
                <c:forEach var="node" items="${results}">
                        <li>
                                <h2><a 
href="${pageContext.request.contextPath}${node.handle}.html">${node.title}</a></h2>
                                <p 
class="pageResultUrl">drintranet-testdev${node.handle}.html</p>
                                <p><cmsu:searchResultSnippet 
query="${fn:escapeXml(param.contentSearchPattern)}" page="${node}" 
chars="120"/></p>
                                <p>Creation Date: 
${node.metaData.creationDate}</p>
                        </li>
                </c:forEach>
        </ol>
</c:if>
[/code]

But it returns: [quote]Creation Date: 
java.util.GregorianCalendar[time=1307354223649,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2011,MONTH=5,WEEK_OF_YEAR=23,WEEK_OF_MONTH=2,DAY_OF_MONTH=6,DAY_OF_YEAR=157,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=57,SECOND=3,MILLISECOND=649,ZONE_OFFSET=3600000,DST_OFFSET=0]
[/quote]

[u]I'm trying to convert this date into a human readable format using this type 
of code:[/u]
  <cms:ifNotEmpty nodeDataName="date">
        <cms:out nodeDataName="date" datePattern="MM/dd/yyyy hh:mm a" 
var="eventDate"/>
  </cms:ifNotEmpty>

But this is not working as pageDate is not a nodeDataName I assume, any idea 
how to get this right?


Thanks in advance.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=e44779af-0404-4d97-9f83-4f4ae9cabdde


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to