Blog Title

Accessing a Blog directly from the main Website

The code for the IFRAME is: <iframe id=”xblog” name="BlogPoint" src="blogs/00000.htm" width=100% height=100%></iframe> The important datum is the name, BlogPoint. This can be anything. Where is is used is in setting up a Link to a Blog from the main Website. The Link to needs to be a relative URL from the website to the blogs folder and to the required Blog filename. This is simply blogs/nnnnn.htm Where BlogPoint come in is in the Open link in field. Adding BlogPoint here ensures the Linked Blog open within the IFRAME. It is not part of the drop-down list but can be typed in directly. The current IFRAME src is changed to the Blog’s URL. A further addition into the body of the IFRAME Placeholder allows the id of the IFRAME to be used in an automatic switch to the source set in the calling URL. If the address is set as http://acorn.xara.hosting/xBlog/index.htm?show=00009.htm then the following code will change the IFRAME to view 00009.htm rather than the default 00000.htm: <script>
var query = document.location.search; if (query) document.getElementById('xblog').src = 'blogs/' + query.substr(6); </script>