开发者

What do meta-if tags in Tumblr do?

开发者 https://www.devze.com 2023-03-29 07:11 出处:网络
The example Tumblr gives is <html> <head> <!-- DEFAULTS --> <meta name=\"if:Show people I follow\" content=开发者_开发百科\"1\"/>

The example Tumblr gives is

<html>
    <head>
        <!-- DEFAULTS -->
        <meta name="if:Show people I follow" content=开发者_开发百科"1"/>
        <meta name="if:Reverse pagination" content="0"/>
    </head>
    <body>
        {block:IfNotReversePagination}
            <a href="...">Previous</a> <a href="...">Next</a>
        {/block:IfNotReversePagination}

        {block:IfReversePagination}
            <a href="...">Next</a> <a href="...">Previous</a>
        {/block:IfReversePagination}

        {block:IfShowPeopleIFollow}
            <div id="following">...</div>
        {/block:IfShowPeopleIFollow}
    </body>
</html>

For these meta-if tags, when I change content="1" to content="0" or content="" nothing seems to happen to the appearance of my tumblr. I don't understand what these meta-if tags do.

According to Tumblr: By including the special meta-if tags in your theme, users can easily toggle options you define. This is useful for showing or hiding different widgets or design elements.

I understood this as you can show/hide different design elements by changing the content value ie. content="0", content="1", content="". But nothing seems to happen to the design if I do this.

I googled this and I can't find any explanation elaborating on what Tumblr says. Can someone please explain?


Tumblr uses meta tags to save preferences of the theme. Meta if will cause that user gets a new checkbox on the Appearance menu. If its checked than the

<div id="following">...</div>

will be shown on your page. So there should be new div element in the page source and three dots displayed on the page.


What Bojan Dević said is correct. Although, I would like to address the other half of your question, as well. content="1" automatically sets the element to be shown, or as content="0" makes it hidden.

0

精彩评论

暂无评论...
验证码 换一张
取 消