Pull label name from widget content


#1

Hi

I read all tutorials about json feeds. I have one quesiton about it :

I want to add json codes in the blogger template and put only label name in the widget content. How can it be possible ?

My purpose is to change label easily, without accesing edit html menu, only on layout menu.

I asked this quesiton on this subject to @Mohammad [http://www.mybloggertricks.com/2015/10/extract-post-excerpt-via-json.html] .

thanks for help


#2

it is simple in the @Mohammad post you get code /-/"+ListLabel+" just replace ListLabel with <data:content/>

like this

document.write("<script src='"+ListBlogLink+"/feeds/posts/default/-/"+&lt;data:content/&gt;+"?alt=json-in-script&callback=mbtlist'></"+"script>");


#3

Thanks! Now how can I call this code to HTML3 widget ?


#4

you have to modify the code to do your job


#5

Is it hard work ? Do you know how to do it ?


#6

No No it is simple you can see the function mbtlist(json)

Just add this code before function like below

document.getElementById("HTML3").innerHTML = function mbtlist(json){

//Your Code goes Here
} 

You can call any id just replace HTML3 with your widget id