Revision 60986
Added by Argiro Kokogiannaki almost 3 years ago
newSearchPage.component.ts | ||
---|---|---|
35 | 35 |
@ViewChild('offcanvas_element') offcanvasElement: ElementRef; |
36 | 36 |
@Input() piwikSiteId = null; |
37 | 37 |
@Input() hasPrefix: boolean = true; |
38 |
@Input() prefix: "OpenAIRE | "; |
|
38 | 39 |
@Input() pageTitle = ""; |
39 | 40 |
pageTitleWithFilters = ""; |
40 | 41 |
@Input() results = []; |
... | ... | |
138 | 139 |
} |
139 | 140 |
|
140 | 141 |
ngOnInit() { |
141 |
// this.properties = properties; |
|
142 | 142 |
//this.getDivContents(); |
143 | 143 |
this.getPageContents(); |
144 | 144 |
this.pagingLimit = this.properties.pagingLimit; |
... | ... | |
166 | 166 |
this.basicMetaDescription.push(this.pageTitle) |
167 | 167 |
} |
168 | 168 |
} |
169 |
console.log("title " + this.pageTitle, this.basicMetaDescription) |
|
169 | 170 |
this.updateMeta(this.pageTitle); |
170 | 171 |
}); |
171 | 172 |
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl; |
... | ... | |
248 | 249 |
} |
249 | 250 |
|
250 | 251 |
updateTitle(title: string, filters:string) { |
251 |
let _prefix = ""; |
|
252 |
if (this.hasPrefix) { |
|
253 |
_prefix = "OpenAIRE | "; |
|
254 |
} |
|
255 |
let _title = _prefix + filters + title; |
|
252 |
let _title = (this.hasPrefix?this.prefix:"") + filters + title; |
|
256 | 253 |
// _title = ((_title.length > 50) ? _title.substring(0, 50) : _title); |
257 | 254 |
this.pageTitleWithFilters = _title; |
258 | 255 |
this._title.setTitle(_title); |
Also available in: Unified diff
[Library|Trunk]
Search page:
fix for undefined properties
add page prefix as an input() attribute (for connect)