HTML Fragment

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
12/31/2007 2:58:59 PM
Gravatar
Total Posts 180
Thomas F. Heringer

HTML Fragment

I do not mean to sound stupid, but what is an "html fragment include"?

1/2/2008 2:44:32 PM
Gravatar
Total Posts 18439

Re: HTML Fragment

Hi Thomas,

Not a stupid question at all. Html Include Fragment feature is probably not of use to very many people. Its a very simple feature that allows you to include html from a static file in the page. The reason its a fragment is because it can't be a complete html file and work correctly. That is can't have an html, head, or body tag because the mojoportal page already supplies those so it can only be html fragment that would go inside a body tag.

This feature was requested by someone who has authored a lot of papers and wnated to show his bibliography on his web site. He already had a way of producing the fragment files so I threw this feature together for him quickly as it was/is very simple. The fragments can be uploaded using the File Manager and should go in the htmlfragments folder.

So if you have normal html files that you would like to include you can use this feature but you must remove the html head and body tags and only leave the stuff thats insode the body tag to create the fragment file.

Hope it helps,

Joe

5/13/2008 12:09:06 AM
Gravatar
Total Posts 68

Re: HTML Fragment

Hi.

I actually have good use for this. I wanted to include a map with regional offices plotted on the map using hotspots so people could click Africa for instance and they would go to that particular regional office page. To do this I created the map on an html page and then removed the HTML and HEAD tags and saved it into the Fragments folder. Then on the home page of the site I created a new content module and included the fragment. It works beautifully. I tried to do this another way but didnt get the desired results. I tried just copying and pasting the html code that I got from creating the map in dreamweaver and pasting it into a new html content module but that didnt show the way I wanted. It added the usual content module borders and stuff which I didnt want. Anyway, please dont ever remove this feature coz there are so many other ways we can make use of this.

I guess it is best used for things that dont change very often (like the map) as you would have to edit the fragment in another HTML editor like dreamweaver and then save it to the portal again. You cant edit the fragment in mojoPortal itself.

I also noticed that if I made a change to the fragment file it didnt show up when i refreshed the page it was included in. UNTIL I clicked EDIT next to the fragment and then just hit UPDATE on the form. Then it works. I assume this is due to some sort of page caching in .NET.

:)

10/31/2009 10:24:05 AM
Gravatar
Total Posts 2

Re: HTML Fragment

I know this is an old post, but it was very helpful, and I think there are a lot of useful things that the HTML Fragment feature.  I run a community website for a small town, and one of the things I put on the page is a weather gadget.  The code is just an HTML Fragment, I like using the HTML Fragment feature. Maybe i'll change my mind later, but for now, im lovin it.

 

11/1/2009 6:35:40 AM
Gravatar
Total Posts 18439

Re: HTML Fragment

Hi,

Typically you can use gadgets in the normal Html Content feature and do not need to use the Html fragment. You just use the html view in the editor and paste in the widget markup or javascript.

Hope it helps,

Joe

4/4/2011 9:23:18 AM
Gravatar
Total Posts 43

Re: HTML Fragment

sorry for picking a very old post but conserning this html fragment is there any way of making a html page whit a simple conection to see the next event in calendar (db connection) and whit this content publishing it to the users?

Just like: in calendar the next event is on 25th april.

So the content shows like: "Next event: 25th april - link here" or something like that

ty

4/4/2011 9:46:04 AM
Gravatar
Total Posts 18439

Re: HTML Fragment

html fragment feature is for static text files containing fragments of html, nothing more.

You might look at Event Calendar Pro which supports an RSS feed for events so you could setup a Feed Manager to consume that feed and then limit the number of items it shows to 1.

Hope it helps,

Joe

4/4/2011 11:05:00 AM
Gravatar
Total Posts 43

Re: HTML Fragment

yeah was expecting a little answer like that...i was already thinking on the pro calendar but atm the team doesn't have founds for it and i'm have to try and give something until we can afford the calendar pro :p

tks for the help

You must sign in to post in the forums. This thread is closed to new posts.