суббота, 30 марта 2019 г.

Embed a Blogger Feed in Your Web Page


I have a small collection of web pages for my various projects. Some of them have an associated blog. Try as I might, I cannot get my students to click on a link on my class web page to take them to the blog. “I can’t find it,” or “There’s too much stuff on your web page,” etc., might be interpreted as lazy whining, or it might be interpreted as bad page design.
Once, on a good day, I took the high road and assumed it was poor page design. So I set out to embed my blogger feed on my class web page.
Now, mind you, I’m not a programmer in the modern sense of the word. I don’t write my pages in raw HTML, I don’t strip down extra code in my pages to make it load 0.2 seconds faster, and go help me if I need Java.
I’m strictly a WYSIWYG Dreamweaver kind of guy who will occasionally set out to solve a problem and paste some code as necessary – if I have step-by-step instructions. So I did a number of searches on Google on how to embed the RSS and Atom feeds from the Blogger pages onto another page.
What I learned: It’s all in how you phrase the question.
I went through several iterations of embedded Javascript functions that didn’t work, read endless pages of PHP commands, figured out that I didn’t have RSS any more but something called Atom (RSS costs money via Blogger Pro), and then stopped looking through Google’s help files.
Instead, I did a general search for: “embed one document within another” and came up with this simple solution, which I am quite sure is obvious to anyone with more training than I have in HTML (which is to say, anyone who has had any training at all).
<object data=http://astronomyspace.blogspot.com/atom.xml width=”600″ height=”400″>
<embed src=http://astronomyspace.blogspot.com/atom.xml width=”600″ height=”400″> </embed>
Error: Embedded data could not be displayed.
</object>
The address is from your atom feed in Blogger. To access it, open your Blogger Dashboard and select preferences for your blog, then click feed. The feed address is right there in the middle of the page.
Now updating my web page is as simple as a one-click Blog This! on my address bar, and I can put announcements or news items there. The same trick works with my iCal public calendar, which I am going to use this year to post lesson plans and assignments for my students.
Mind you, there are many other ways of solving this problem. For example, I could have ported the fixed content of my web page to my Blogger template and just used the Blogger page as my class page without embedding anything. But I like my Dreamweaver sites, and I already have a page in place, so this worked for me.

0 коммент.:

Отправить комментарий