Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I'm trying to do some stuff on my Tumblr layout, and I want some links to remain accurate regardless of whether the blog's URL later change. Either this is not possible from the documented variables or, if it is possible, is done via another mean.

Is there a mean to achieve that?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

You can use the name variable as long as it references the root "/"

<h1><a href="/">{Name}</a></h1>
share|improve this answer
    
{Name} is document as several things, and I failed to see this (completely) use in one of the examples for the {block:likes}: <a href="http://www.tumblr.com/liked/by/{Name}">. Looks like I got what I wanted. I just hope it works elsewhere. –  Circeus Apr 2 '12 at 3:29
add comment

The {Host} variable returns the host name of the tumblr blog. For example, if the URL is http://foo.tumblr.com, {Host} will return foo.tumblr.com. Similarly, using {Host} for custom domains, i.e. http://www.my-tumblr-blog.com will return www.my-tumblr-blog.com.

You can use the following code for generating links:

<h1><a href="http://{Host}">{Name}</a></h1>

or better:

<h1><a href="//{Host}">{Name}</a></h1>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.