Hi albert_b
To known if current web user is already logged into Dédalo, you can access the dedalo_logged
cookie from the browser (on same domain) and check it.
To provide this functionality, the numisdata
template uses this environment value:
(file ´web_site/tpl/page/js/enviroment.js.php´)
const dedalo_logged = typeof document!=='undefined' && document.cookie.indexOf('dedalo_logged')!==-1 ? true : false;
Then you can check for the current cookie value and render a link button, something like this:
// section_id (dedalo users only)
if (dedalo_logged === true) {
const link = common.create_dom_element({
element_type : "a",
class_name : "section_id go_to_dedalo",
text_content : row.section_id,
href : '/dedalo/lib/dedalo/main/?t=numisdata4&id=' + row.section_id,
parent : fragment
})
link.setAttribute('target', '_blank');
}
Best