sivaprasad9394
Occasional Collector

Velocity Template is auto appending ?[object Object] at end of the href link

Hello,

I would like create a new link with href attribute for anchor tag inside the velocity template.But $param is the value which comes from the database.

When i use it inside the href attribyte it automatically appending the ?[object Object] at end.

Why this behavious is happening?

Example....

#set($params = $feed.getLinkByRel("params").getHref().getQuery())

cat=RG&terms=CN

<a class="link-overview" href="$params"><img src="$portalPrefix$CMS_REF(media:"lnkarrow",abs:2)$" width="$CMS_VALUE(ref(media:"lnkarrow").width, default:"0")$" height="$CMS_VALUE(ref(media:"lnkarrow").height, default:"0")$" border="0" style="padding-bottom:2px;margin-top:-7px;margin-right:5px;">$params</a>

Generated HTML Code:

<a href="URLOFPORTAL?itemsPerPage=25&order=publicationDate&reverseOrder=true&cat=RG&terms=CN?[object Object]" class="link-overview"><img width="3" border="0" height="5" style="padding-bottom:2px;margin-top:-7px;margin-right:5px;" src="lnkarrow.gif">cat=RG&terms=CN</a>

Please refer the attached image too.

What could be the problem for this...???

0 Kudos
3 Replies
Peter_Jodeleit
Crownpeak employee

Where is the FirstSpirit relation in this question?

Peter
0 Kudos

Currently iam working in FS Server-Version: 4.2.488.56504.My Velocity template is also a Format Template for rendering the news in the portal page.So i posted the question in the Forum.

If i post in specific Velocity template forums.They dont know what is FirstSpirit.Do i need ro post there?

Thank you.

0 Kudos

Yes, I think so. This is not FirstSpirit specific.

Peter
0 Kudos