The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Help with tumblr {block:IndexPage} showing on other pages
hankkosovo
post Aug 3 2011, 07:23 PM
Post #1





Group: Members
Posts: 2
Joined: 3-August 11
Member No.: 15,078



Hi Guys,

Basically, I have used the {block:IndexPage} tag correctly, but it is showing up on {block:SearchPage} and {block:TagPage} and I have no idea why.

Does anyone happen to know why, is this a known bug?

Below is the code that I have used:

CODE


{block:TagPage}
            <div class="post meta">            
                <span class="post-info-wrapper"></span>            
                <h2 class="title">Tags</h2>        
                <span class="post-info-wrapper"></span>        
                <span class="content">
                </span>
            </div>
        {/block:TagPage}
        
        
        
        
        {block:SearchPage}
            <div class="post meta">            
                <span class="post-info-wrapper"></span>            
                <h2 class="title">Search Results</h2>        
                <span class="post-info-wrapper"></span>        
                <span class="content">
                    <p>Your search results for {SearchQuery} has found {SearchResultCount} posts.</p>
                </span>
            </div>
        {/block:SearchPage}
    

    
    
        {block:IndexPage}
        {block:IfShowDescription}

            <div class="post meta">            
                <span class="post-date-wrapper"></span>
                <h2 class="title">{text:Description Header}</h2>
                <span class="post-info-wrapper"></span>

                <span class="content">
                    {block:IfShowPortrait}<img class="portrait" src="{PortraitURL-64}" alt="Avatar"/>{/block:IfShowPortrait}
                    {Description}
                </span>
            </div>

        {/block:IfShowDescription}    
        {/block:IndexPage}



Thanks in advance!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 3 2011, 07:30 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I guess the curlies are part of some kind of templating lingo. What is this "it" that is showing up where it shouldn't though?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
hankkosovo
post Aug 4 2011, 04:48 AM
Post #3





Group: Members
Posts: 2
Joined: 3-August 11
Member No.: 15,078



QUOTE(pandy @ Aug 3 2011, 07:30 PM) *

I guess the curlies are part of some kind of templating lingo. What is this "it" that is showing up where it shouldn't though?


Yeah that's correct, a lot like how wordpress works.

Basically, in tumblr if you use {block:IndexPage} {/block:IndexPage} anything that you put in between those tags will show only on the index page, but it is showing on the search and tag page as well, and I have no idea why?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 4 2011, 06:50 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Oh, you said Tumblr in the topic line. Sorry, I didn't see. No idea, I'm afraid.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
m-q
post Aug 7 2011, 05:15 PM
Post #5





Group: Members
Posts: 1
Joined: 7-August 11
Member No.: 15,109



From http://ejdraper.com/post/280968117/advance...-customization:

The syntax for identifying the index page refers to any type of index page, which also runs to both search result pages, and tag result pages. So this means that placing my header image solely within a {block:IndexPage} means it’d also show on both search and tag pages too, which I didn’t want. Seeing as how there is syntax for identifying a search page ({block:SearchPage}) and a tag page ({block:TagPage}), we can use these to specify a class that will cause the banner to be hidden in those circumstances, leaving it showing on the other remaining type of index page, the homepage. The code looks a little something like this:

{block:IndexPage}
<div id="index"
{block:SearchPage}class="hidden"{/block:SearchPage}
{block:TagPage}class="hidden"{/block:TagPage}>
<a href="/">
<h1 id="logo">Elliott J Draper, Freelance Developer</h1>
</a>
<div id="headings">
<div id="web">Web and mobile development</div>
<div id="rails">Ruby on Rails specialist</div>
<div id="deliver">I always deliver</div>
<div id="bank">And I won't break the bank</div>
</div>
<div class="clear"></div>
</div>
{/block:IndexPage}

And the CSS is real straightforward:

.hidden { display: none; }
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 02:19 AM