Link to Netflix instead of Amazon?
Link to Netflix instead of Amazon?
Has anyone figured out a way to modify a DVDPedia template so that the cover image links to a Netflix lookup instead of the Amazon store? I'd like to make it easier for viewers (of my movie reviews/movie collection) to add a movie to their Netflix queue.
Re: Link to Netflix instead of Amazon?
You have to change the link in the template to Netflix which isn't hard but unfortunately the way the links are created it's going to be a bit tricky to include.
Links in Netflix have this format: which means in your template the link would have to look like this:
That number at the end is an internal Netflix ID which you'd have to add manually to your DVDpedia database so the program can pick it up during export, for example from a custom field as used above.
Trickier though is the title part of the link since the spaces need to be replaced with underscores. You could use a javascript function that'll do the replace for you. (This is cobbled together; if anyone has a more elegant solution, please post!)
In the head you'd have this function:
And the link in the body would look like this:
Links in Netflix have this format:
Code: Select all
http://www.netflix.com/Movie/Harry_Potter_and_the_Half-Blood_Prince/70099612
Code: Select all
http://www.netflix.com/Movie/[key:title]/[key:custom1]
Trickier though is the title part of the link since the spaces need to be replaced with underscores. You could use a javascript function that'll do the replace for you. (This is cobbled together; if anyone has a more elegant solution, please post!)
In the head you'd have this function:
Code: Select all
<script type="text/javascript">
function replaceSpace(aLink) {
aLink.replace(" ", "_");
document.open(aLink);
}
</script>
Code: Select all
<a href="javascript:replaceSpace(http://www.netflix.com/Movie/[key:title]/[key:custom1])"></a>