The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Tumblr Theme: Target Specific Posts
Daniel Black
post Sep 6 2011, 11:26 AM
Post #1





Group: Members
Posts: 1
Joined: 6-September 11
Member No.: 15,341



Hi,

I'm porting my Wordpress theme to Tumblr, and I'm on the verge of concluding that Tumblr isn't a good fit for what I want to do. Either my google-fu is pitiful, or existing documentation for advanced usage is pitiful.

My particular issue is that I pull the newest six posts, and then style the first by itself, the next two as a group, and then the final three as another group. I can access the Wordpress database directly, and pull post content using offsets. I understand that Tumblr's not primarily designed for this, but I had thought I might be able to use the {Block:Post[n]} variable to target specific posts. The Tumblr documentation doesn't specify where this variable fits into the hierarchy, nor any limits to its usage, but I've found that it doesn't supersede the {Block:Posts} variable, nor, more importantly, can you do something like this:

{Block:Posts}
{Block:Post1}
{Block:Text}
{Body}
{Block:Text}
{/Block:Post1}
{/Block:Posts}

The {Block:Post[n]} variable merely augments the output of {Block:Posts}. It might be possible to send HTML via {Block:Post[n]}, but in my limited testing I can't target the position of this variable's output.

Is there a known way to fully target the HTML and CSS of posts based on their relation to the newest in a Tumblr theme? The only other thing I can think of is traversing the DOM and using JavaScript to inject HTML and CSS. I am not capable of doing that, and don't think it's worth my while (at the moment) to figure it out. If that's the only way, then I will conclude that Tumblr doesn't fit my needs for this design.

Cheers,

Daniel
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


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: 9th June 2024 - 03:02 AM