enabling custom text in external javascript file

20 views
Skip to first unread message

Kat Li

unread,
Apr 14, 2017, 9:46:33 PM4/14/17
to Tumblr API Discussion
Hi,

So I have something like this:

<head>
<meta name="text:Email" content="email_...@xyz.com">
<meta name="text:Location" content="NYC">
</head>

<body>
<ol>
<li>{text:Email}</li>
</ol>
</body>

<footer>
<script>
$("ol").append("
<li>{text:Location}</li>");
<script>
</footer>

Tumblr recognizes custom text variables when written like above, but won't when written like below:

<head>
<meta name="text:Email" content="email_...@xyz.com">
<meta name="text:Location" content="NYC">
</head>

<body>
<ol>
<li>{text:Email}</li>
</ol>
</body>

<footer>
<script type="text/javascript" src="append_location_item.js"></script>
</footer>

While the first list item returns "email_...@xyz.com", the second list item returns "{text:Location}". What is the work around?

Kathy
Reply all
Reply to author
Forward
0 new messages