在Blogger中将标签插入到图片alt标签中

时间:2022-09-12 19:37:04

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?

只是想知道是否有人知道如何将博客标签变成图像中的“alt”标签。我试过alt =“data:post.labels”根本没用?

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?

P.S - 我知道'rel = tag' - 但对于特定模板,我想让标签在alt标签中显示为文本?

1 个解决方案

#1


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:

看起来您可能正在使用模板化Blogger的XML版本。如果是这种情况,那么如果你想让ALT属性显示标签的名称,你需要使用类似下面的内容:

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:

您可以使用相同的原则在链接的TITLE属性中显示标签/标签,链接如下:

<a expr:href='data:label.url' expr:title='data:label.name'><data:label.name/></a>

#1


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:

看起来您可能正在使用模板化Blogger的XML版本。如果是这种情况,那么如果你想让ALT属性显示标签的名称,你需要使用类似下面的内容:

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:

您可以使用相同的原则在链接的TITLE属性中显示标签/标签,链接如下:

<a expr:href='data:label.url' expr:title='data:label.name'><data:label.name/></a>