how to use variable in url of a blogger script

  blogger, javascript

i want to replace the blogger feed with external feed
so i made a JSON feed and warped in calling function and saved in external server
and i replaced the default feed

<script expr:src='data:blog.canonicalHomepageUrl + &quot;/feeds/posts/summary/?alt=json-in-script&amp;redirect=false&amp;start-index=1&amp;max-results=200&amp;callback=related_posts&quot;'/>

with

<script src="https://example.com/feed.js"></script>'

and it worked well, but i want to use variable in URL to change the feed between
feed1.js ….. feed4.js
so i want to add variable from 1 to 4 in the script URL
how to do that?

tried that but didn’t work

<script expr:src='&quot;https://example.com/feed&quot; + variable + &quot;.js&quot;'/>

any idea?

Source: Ask Javascript Questions

LEAVE A COMMENT