#Inserting links into braces
87 messages · Page 1 of 1 (latest)
And this is what happens when attempting to redirect to Wikipedia, as the page does not exist on my Wiki. The bar erroneously stretches instead and yields "Expression error: Unexpected < operator."
{{period start|Cambrian}} might require changes, but changing subsequent internal links to interwiki ones still breaks the template
It's this template here. My wiki's locked up pretty tight because it's a team thing; would link to it otherwise.
The reason I use it is for tooltip consistency, because I don't care the w: prefix in the interwiki link
Either way though, removing it still creates the issue, so it's not <span> that's doing it. The other angle brackets are part of the <div style>, which I've tried but can't remove without breaking things.
Do you have all the templates and modules?
Like Template:Period color?
I do; just kept the essentials though since I don't need the protection modules/templates yet
I get that, I don't use them either
Can you please post a link to the problem on your own wiki? Like it asks you to do when you create a post?
@marsh badger see his comment here ↑
That's a wikipedia link.
Read the message after it
It's really hard to debug a bug with someone else's correctly working example ¯_(ツ)_/¯
It looks like {{period start|Cambrian}} returns an HTML tag rather than a number.
and then {{#expr:}} dies because it sees a math equation beginning with a less than sign.
I just got the go-ahead to unlock things so let me go ahead and try to be a bit more helpful: https://salotum.miraheze.org/wiki/Template:Phanerozoic_220px
The bar itself is fine; it's the linking that's messed up
Currently, clicking the "Ꞓ" on the bar takes you to the local wiki's Cambrian page, which doesn't exist. I want it to go to Wikipedia's page instead.
okay
PreꞒ is the only one I can get to use an interwiki link because it doesn't follow the same format
Let's see..
You need to edit Template:fossil range/bar
Yeah, it is a redirect on Wikipedia too
[[{{{1}}}|{{{2}}}]] -> [[w:{{{1}}}|{{{2}}}]]
Ah you skipped the redirect
Yeah, you could also just Interwiki redirect those pages (which is useful but makes it annoying to edit later)
#REDIRECT [[w:Cambrian]] would actually work.
I personally find it annoying to get directed to a page where you ned to click again to get to the page you want.
But it is a possibillity indeed
Yeah works fine now doesn't it?
That'll do it; didn't think it could parse that. Only question I've got is if I can simultaneously make it tooltip without the w: prefix. Would it being something to add to Template:fossil range/bar?
Let me see the code again 😉
Much appreciated folks 🙌
he means [[w:{{{1}}}|{{{2}}}|alt={{{1}}}]]
Uh oh
Okay, that didn't work
I don't have another solution to remedy this. Normally one should be able to put an alt in
I think the alt thing only works on images.
Hmm, You might be right
Let's greate a task for that 😄
But i all seriousness.. if it doesn't bother you too much, leave it. It works, and people know there goint to a Wikipedia page
tey're*
they're*
I'm not obsessed enough to make it my white whale, so I probably will leave it be. Might just try <span> one final time since that worked for links previously.
Thanks for the help, both of you. Only other issue I've got left to squash is that troublesome taxobox color assignment issue. Might actually stem from something similar to [[{{{1}}}|{{{2}}}]] -> [[w:{{{1}}}|{{{2}}}]]
[[w:{{{1}}}|{{{2}}}|<span title="{{{2}}}">{{{1}}}</span>]]
Could you try this? in stead?
It likely won't work, but to not try... is never knowing
Huh that's interesting
It gives the period's letter as the tooltip upon first mouseover and then switches to the w: interlink in subsequent mouseovers
Hmmm, So it should be possible then
It does indeed with K and D
It stays like that in fact
Let's try this one
[[w:{{{1}}}|{{{2}}}|<span title="{{{1}}}"></span>]]
I don't think that will work either
the span either needs to be on the outside or around the {{{2}}}, I'm not sure which.
possibly.
[[w:Wikipedia|<span title="Wikipedia">Encyclopædia Wikipedia</span>]]
If I do this, and I hover over, It shows Wikipedia.
So this should definately work
This worked
Yeah.
The help is very much appreciated.