1

我正在尝试编辑 Tumblr 自定义 HTML 以向我的 Tumblr 主题添加另一个标题链接。

我在 stackoverflow 中搜索了“Tumblr”“自定义 HTML”“block:Pages”和“link”,但没有在我的代码中找到导致以下问题的错误:

  1. 我复制粘贴

    <li><a href="/archive/">{lang:Archive}</a></li>
    
  2. 然后我改变了

    "/archive/"
    

    "/submit/"
    

    {lang:Archive}
    

    {lang:Submit a Post}
    

我最终得到一个带有标题链接的网页,单击该链接时,会将您带到正确的页面,但该链接没有文本。请查看问题的屏幕截图和我正在尝试修复的网站。

我已经包含了一个代码片段,以便您可以帮助我进行故障排除。谢谢!

<div class="container">
    <div id="headerwrap">
    <div class="span-18" id="header">
        <div class="span-18 last"><ul>
            <li><a href="/" class="name active">{Title}</a></li>
            {block:HasPages}
                {block:Pages}<li><a href="{URL}">{Label}</a></li>{/block:Pages}
            {block:HasPages}
            <li><a href="/random/">{lang:Random post}</a></li>
            <li><a href="/submit/">{lang:Submit a Post}</a></li>
            <li><a href="/archive/">{lang:Archive}</a></li>
        </ul></div>
    </div></div>
    {block:IfHeaderImage}<img src="{image:Header}"/>{/block:IfHeaderImage}
    <div class="span-24"><div class="span-5 blue_striped">&nbsp;</div><div class="span-18 last"><p>{Description}</p></div></div>
    <hr/>
4

1 回答 1

2

The {lang:} tag lets you specify an English string that should be displayed in the user's language, but it only works with a predefined set of strings that can be found here:

http://www.tumblr.com/docs/en/localizing_themes

You can "request a string be added", but I have no idea how long that would take. Best would probably be to drop the {lang:} wrapper and just include the text directly:

<li><a href="/submit/">Submit a Post</a></li>

The string won't be localized for non-English users, but oh well!

于 2013-07-10T16:51:07.463 回答