<%= key %>
<%= currentObj.length %>
<% var baseUrl = quickSearchLabels.search_page_path + "." + currentObj[0].navigroup + ".html?productgroupList=" + currentObj[0].groupId; %>
<% if (currentObj[0].navigroup && currentObj[0].navigroup.toLowerCase() === "investment") { %>
<% baseUrl += "&productCategory=" + currentObj[0].groupId; %>
<% } %>
<% // NEW: when navigroup is 'funds', add productSubNavi=Alle Fonds %>
<% if (currentObj[0].navigroup && currentObj[0].navigroup.toLowerCase() === "funds") { %>
<%
var sepFunds = (baseUrl.indexOf('?') === -1) ? '?' : '&';
baseUrl += sepFunds + "productSubNavi=" + encodeURIComponent("Alle Fonds");
%>
<% } %>
<% if (currentObj[0].longShort && typeof currentObj[0].longShort === 'string' && (currentObj[0].longShort.toLowerCase().indexOf('long') >= 0 || currentObj[0].longShort.toLowerCase().indexOf('short') >= 0)) { %>
<% baseUrl += "&longOrShort=" + currentObj[0].longShort; %>
<% } else if (currentObj[0].longShort && typeof currentObj[0].longShort === 'string') { %>
<% baseUrl += "&callOrPut=" + currentObj[0].longShort; %>
<% } %>
<% baseUrl += quickSearchLabels.underlyingISIN; %>
<% // --- FIXED: only append queryString when searchParam is non-empty and encode it ---
var rawSearch = currentObj && currentObj[0] && currentObj[0].searchParam;
if (rawSearch != null) {
var trimmed = String(rawSearch).trim();
if (trimmed.length > 0) {
var sep = (baseUrl.indexOf('?') === -1) ? '?' : '&';
baseUrl += sep + "queryString=" + encodeURIComponent(trimmed);
}
}
%>
<%= quickSearchLabels.new_quick_search_goto_products %>