Jump to content
thirty bees forum

How can the target of the 'Learn more' link in the EU Cookie Consent module be changed?


Angstony_2

Recommended Posts

I've written my own cookie policy in a CMS page and edited the EU Cookie Consent module's 'Learn more' link to point to that (/info/cookie-policy), rather than an external website. It's working, but I would like it to open in the same tab to be consistent with all other internal links.

I understand that I need to remove the target="_blank"attribute, but I can't see an option to do that in the module and I can't find a document that references the link's class name (cc-link). In fact I've even searched the entire Thirty Bees github and the database for cc-link but nothing is found, so I'd be interested to learn how this document is even generated, if someone can tell me, please.

Link to comment
Share on other sites

I spent another hour on this today but I'm still none the wiser, so I've given up for now and just posted a feature request on the module's github repository. I know it's only a minor issue, but it bugs me nonetheless. And to my mind it should definitely be an option in settings – especially as there is no obvious way for non-coders to change the link generated – so I hope the TB devs will agree and it will get implemented at some point.

In the meantime, I'm sure there must be plenty of people here with the skills to work around this issue, so I would still appreciate some help if any is forthcoming.

Link to comment
Share on other sites

@wakabayashi Well I could provide a link, but I don't really see how that will help to explain it any better. Let me try again. I've edited the module's 'Learn more' link to point to an internal CMS page, thus: /info/cookie-policy. Now, because it's an internal link it really ought to open that page within the same tab of the browser, just like every other internal link does, but because it has the target="_blank" attribute set it's opening in a new tab. I'd like to be able to change that behaviour, but it's not possible – at least not with my extremely limited knowledge of PHP coding.

Link to comment
Share on other sites

@MockoB If only it were that simple! As far as I can tell none of the tpl files that come with the module define that link. I think it's generated by a function in 'eucookieconsent.php', but that's beyond my understanding presently.

@lesley That would be good too and something I'd like to learn how to do later, but for now I'd just be happy if it wasn't opening in a new tab. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...