How can I use a content source field in tumblr custom HTML theme?
I'm trying to create a custom HTML theme in tumblr.com I'd like to use a content source field which is highlighted on image - http://i.stack.imgur.com/5xkM5.jpg
For example I want to place a custom discription below a post:
> Origi开发者_如何学运维nal post you can see <a
> href="$content_source_field">hire
Please help me with code for my theme.
The variable that use "$content_source_field" is something that tumblr will automatically determine, you don't need to set it to anything specific.
In order for tumblr to know which URL to use (either the content source or the post entry), you'll need to use {LinkURL} as the href value.
Use {block:ContentSource}
variable for this. If you define it, tumblr won't override it. Dont forget to add a {block:RebloggedFrom}
variable too; otherwise tumblr will add the via {some resource} automatically:
{block:ContentSource}
Original post you can see <a href="{SourceURL}">here</a>
via {block:RebloggedFrom}<a href="{ReblogParentURL}">{ReblogParentTitle}</a>{/block:RebloggedFrom}
{/block:ContentSource}
精彩评论