Hey Robert is there a easy method to make my link appear in the title section of my results?
Solved! Go to Solution.
Rudo,
Easy... Not exactly. In the Widget.js you would search for and update this block (based on line 1):
if (titlefield && upperCaseFieldName === titlefield.toUpperCase()) { if(layerConfig.name === 'Your layers name'){ title = "<a href='" + lyrQLinks[0].link + "' target='_blank' title='" + lyrQLinks[0].alias + "'>" + lyrQLinks[0].alias + "</a>"; }else{ title = value; } } else {
And then in List.js
var rTitle = domConstruct.toDom(item.title); //var rTitle = domConstruct.create("strong"); domAttr.set(rTitle, "id", this.id.toLowerCase()+item.id); domClass.add(rTitle, "label"); //rTitle.textContent = rTitle.innerText = item.title; domConstruct.place(rTitle, div);
This will still leave you with the issue of having the link listed in the results body and in the title of both the search results and the popups. I don't have time to spend on that portion.
Rudo,
Easy... Not exactly. In the Widget.js you would search for and update this block (based on line 1):
if (titlefield && upperCaseFieldName === titlefield.toUpperCase()) { if(layerConfig.name === 'Your layers name'){ title = "<a href='" + lyrQLinks[0].link + "' target='_blank' title='" + lyrQLinks[0].alias + "'>" + lyrQLinks[0].alias + "</a>"; }else{ title = value; } } else {
And then in List.js
var rTitle = domConstruct.toDom(item.title); //var rTitle = domConstruct.create("strong"); domAttr.set(rTitle, "id", this.id.toLowerCase()+item.id); domClass.add(rTitle, "label"); //rTitle.textContent = rTitle.innerText = item.title; domConstruct.place(rTitle, div);
This will still leave you with the issue of having the link listed in the results body and in the title of both the search results and the popups. I don't have time to spend on that portion.
No worries, I will look into it and see what I my output looks like. Thanks again for the help Robert, you're a gentleman and a scholar.