views:

493

answers:

1

I'm hosting my blog in SquareSpace, and I need to add a <Script> tag at the footer of every post.

In the middle of this <Script> tag, I need to replace a value with the permalink for the current post.

So, in my home page, where I'm showing 5 posts, I need this <Script> to show up 5 times, each time with the permalink of the corresponding post inside it.

In wordpress, I can directly edit the HTML of posts, and I can do:

<script type="text/javascript">
    var myVar = "<?php the_permalink() ?>";
    ... more code ...
</script>

How can I do this with SquareSpace?
I haven't found anywhere to edit the templates directly.

Thanks!
Daniel

A: 

I'm not exactly sure what you want to do or how to do it in Squarespace but here are a couple tips / resources:

If you login and go to your blog page, then switch to 'Structure Editing Mode' by clicking the cubes icon at the top right of the screen, you can then access the 'Configure this page' button for the blog page. In the configuration settings for the blog you can add the Permalink button to the bottom of every post.

If you login and go to 'Website Configuration' at the top left, then go to 'Website Settings > Code Injection' you can select different areas to edit. You might be able to do what you need here. You may need to upgrade your account to access the particular Code Injection Point you want to edit.

Another option is to just use the code injection point (no account upgrade needed) to apply the script in some way.

A great Squarespace resource is the Developers Forum at http://www.developers.squarespace.com

I hope this helps!!

VUELA