Hey Guys so I'm using Thymelaf in my HTML Email template. I'm creating a hyperlink that looks like this:
<a th:href="#{https://example.com/#/login?username=__${username}__}">th:utext="https://example.com/#/login?username=${username}"</a>
The first part of the link works correctly and the username is correctly resolved by the template engine, but as you can see the link text doesn't map at all. I want the link text to be exactly like the link itself. Does anyone know how this can bed done?
Solved with a simple <span> tag :)
<a th:href="#{https://example.com/#/login?username=__${username}__}"><span th:text="'https://example.com/#/login?username='+${username}"></span></a></p>
Related
I have this src="https://open.spotify.com/embed/track/1Go9q6KaCpAsQ0wkZFGzY2?utm_source=generator" and I want it to be like this src="https://open.spotify.com/embed/track/{{ spotify_trackid }}?utm_source=generator"
how can I do this using django without it breaking the link?
sorry for the bad explanation i'm pretty new to this
You should use href attribute to add links to your text like this:
Your Text
And you can't play with URL of websites
Back with another big question:
I have to create a network of pages with content linked though them. For link inside the same page i'm using this method:
<div id="anchorname">
The content.
</div>
and:
Link Text
Now i have to link to the #anchorname from another page but it doesn't work, i tried this:
Link Text
Is there something i am doing wrong?
This is possible to do. You might try using the full name of the page including the suffix. e.g:
Link Text
If that doesn't work then I would experiment with using a full path.
EDIT: As you've stated that you're using Wordpress then you should try it like this:
Link Text
I made attempt and tried to find my goal But I couldn't and found solution like this that didn't benefit for me!
I have <img src="url" title="ali.com"> I want to make ali.com a link. I used
title=ALI.com but doesn't work! any way?
The title attribute accepts only plain text, you cannot have any markup there.
If you want a tooltip with a link inside (and I'd urge you not to as it is a difficult UI to use), then you'll need to build the whole thing with JavaScript and DOM.
Above answers suffices your requirement, but specific to your use case :
<img src="image url" title="ali.com"/>
You can use url as a title (google.com?d=1&e=2 this is string)
You need to run little js code to achieve final goal
put something like this html
<a class="mylink"> <img title="blahblah" scr =""></img></a>
and you can get title string by
yourtitlestring = $(".mylink img").attr("title")
and now you can set href of link
$(".mylink").setAttribute("href", yourtitlestring);
I have this code on my blogger theme.
<a expr:href='data:post.authorProfileUrl' rel='author' title='author profile'>
how can I put /?rel=author behind data:post.authorProfileUrl.
I have tried to put that directly like this
<a expr:href='data:post.authorProfileUrl/?rel=author' rel='author' title='author profile'>
but it didn't work.
I'm expecting something like this
<a href="https://plus.google.com/+ZinebAitBahajji/?rel=author">
Please help
Display post author, date, labels and comments with icons below post titles
This is not actually what you are searching for but This article may be helpful to you. You may get some Idea from the above mention step by step article.
Just wondering whether anyone knows how to get blogger labels into "alt" tags in an image. I have tried alt="data:post.labels" to no available at all?
Doesn't anyone know how to assist with this on blogger?
P.S - I know about the ‘rel=tag’ - but for the specific template, I want to have the labels appear as text in the alt tags?
Looks like you may be using the XML version of templating Blogger. If that's the case, then you'll need to use something like the below if you want to have the ALT attribute show up with the name of the tag:
expr:alt='data:label.name'
You can use the same principle to display the label/tag in the TITLE attribute of a link, link so:
<a expr:href='data:label.url' expr:title='data:label.name'><data:label.name/></a>