Search…

X3 Photo Gallery Support Forums

Search…
 
pinkrabbit1357
Topic Author
Posts: 19
Joined: 28 Aug 2022, 18:02

custom Contact link

02 Sep 2022, 17:40

is it possible to make the Contact link in the sidebar a simple mailto: instead of going to a physical page? thanks
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: custom Contact link

03 Sep 2022, 00:09

pinkrabbit1357 wrote: is it possible to make the Contact link in the sidebar a simple mailto: instead of going to a physical page? thanks
This can be done, but the easiest would be to use some simple Javascript, because X3 tries to create relative links from your email links. This will also help bypass bots that attempt to collect emails for spamming.
  1. Create an empty placeholder page, for example "mail" /mail/.
  2. Add the following to Settings > Custom > Custom Javascript
    Code
    var mail = document.querySelector('[href$="/mail/"]');
    if(mail) mail.href = 'mailto:someone@somewhere.com';
  3. For the page, you can of course change the LABEL option so that it displays however you like in the actual menu.
 
pinkrabbit1357
Topic Author
Posts: 19
Joined: 28 Aug 2022, 18:02

Re: custom Contact link

03 Sep 2022, 11:31

got it working, thanks