That makes a lot of sense, I'll have a play with changing it around. Cheers Colin
On Friday, 21 December 2018 13:15:39 UTC+13, Thomas Keffer wrote: > > Yes, there is more than one way to do it. > > However, it's important to note that the end result is not the same. If > you do a Cheetah #include directive (my suggestion, and what the Seasons > skin does), the page is included *at template processing time*. You'll > end up with a single HTML page with all the content. > > By contrast, your approach includes the file *at runtime* in the client. > It will involve an extra HTTP fetch to get the second HTML file. > > -tk > > On Thu, Dec 20, 2018 at 3:42 PM Colin Larsen <[email protected] > <javascript:>> wrote: > >> Ok found it solution - sorry Pat, answering my own question but other may >> be interested :) >> >> First I created a tmpl file with the tags I wanted (I called it >> stationinfo.html.tmpl) and saved that in the skins/Belchertown directory >> >> I then edited skin.conf to include the new tmpl file, just below the >> [[[about]]] I added >> >> [[[stationinfo]]] >> >> template = stationinfo.html.tmpl >> >> This generated my html file in the web root directory >> >> I then used this script that I found in my inc file >> >> <html> >> <head> >> <script src="jquery.js"></script> >> <script> >> $(function(){ >> $("#includedContent").load("http://41south.net.nz/stationinfo.html"); >> }); >> </script> >> </head> >> >> <body> >> <div id="includedContent"></div> >> </body> </html> >> >> >> Voila - I have the information in the inc section . :) >> >> I'm sure there are some grammatical errors here so far as html goes, but >> it works >> >> Cheers >> Colin >> >> On Friday, 21 December 2018 12:27:14 UTC+13, Pat wrote: >>> >>> Hmm. I don't think so, but let me look into it. >>> >>> On Thursday, December 20, 2018 at 5:50:54 PM UTC-5, Colin Larsen wrote: >>>> >>>> Hi all >>>> >>>> Quick group question as my html skills are not fantastic; >>>> >>>> Pat has made available some 'inc' pages to put custom code sections in >>>> various places on his skin. Full html code works fine and I've put >>>> together >>>> an alternative 3 day forecast section already to replace Darksky, which is >>>> for some reason inaccurate down here. >>>> >>>> My question is, how would I put Weewx tags into one of these pages? I >>>> assume it would require a tmpl file with the tags which is then included >>>> in >>>> Pats inc file - sort of nested html? >>>> >>>> Any pointers appreciated >>>> >>>> Cheers >>>> Colin >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
