Author Topic: Flyout menu Question  (Read 1119 times)

0 Members and 1 Guest are viewing this topic.

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Flyout menu Question
« on: March 11, 2022, 09:02:46 PM »
I am attempting to make a 3 level drop down of the following portion of my flyout menu

<item Caption="Models" title="Forecast Models">
         <item caption="GFS"/>
            <item caption="MSLP and Precip" link="wxgfs-precip.php"/>
            <item caption="Temp" link="wxgfs-temp.php"/>
         </item>

Following the guide for menu structure I cannot get it to work. If I leave the ending slash out after "GFS", I get an error message for the last line of the xml file, which is </menu>. Based on the structure format, "GFS" should end in just a >. My site is scannorthcounty.net

I have attached a copy of my menu before and after the section in question.

I am sure I am missing something that is obvious. Looking for any suggestions.

Thanks,

John
John
Westminster, MA USA

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Flyout menu Question
« Reply #1 on: March 11, 2022, 09:31:12 PM »
It definitely needs to be like this
Code: [Select]
  <item caption="Local Forecast" title="Local Weather outlook">
    <item caption="GFS">
      <item caption="MSLP and Precip" link="wxgfs-precip.php"/>
      <item caption="Temp" link="wxgfs-temp.php"/>
    </item>
    <item caption="Forecast details" link="wxforecastmap.php"/>
    <item caption="Forecast-Old Style" link="wxforecast.php"/>
    <item caption="Graphical Forecast" link="wxgraphicalfc.php"/>
    <item caption="Dark Sky Forecast" link="https://darksky.net/details/42.5562,-71.8821/us12/en" target="_blank"/>
    <item caption="NWS 3 Day Forecast" link="wxus3dwpcfrontfc.php"/>
    <item caption="NWS 3-7 Day Forecast" link="wxwpcmedr.php"/>
    <item caption="Forecast Discussion" link="wxforecast-discussion.php"/>
    <item caption="Winter Forcast" link="https://www.weather.gov/box/winter" target="_blank"/>
    <item caption="UV Index Forecast" link="wxuvforecast.php"/>
    <item caption="Air Quality" link="wxaqirssV2.php"/>
    <item caption="Atlantic Surface Analysis" link="wx_atlantic_surface_analysis.php" target="_blank"/>
  </item>
The / closes off an item, and the open and close of tags need to match.   
An '<item .... />' is self-closing, an '<item ... >' needs a later '</item>' to close it off.



Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: Flyout menu Question
« Reply #2 on: March 12, 2022, 10:09:58 AM »
Ken,

This is what I have and it still sends an error message

Quote
<item Caption="Models" title="Forecast Models">
      <item caption="GFS">      
         <item caption="MSLP and Precip" link="wxgfs-precip.php"/>
         <item caption="Temp" link="wxgfs-temp.php"/>
      </item>   

Must still be missing something. Also, I have Quoted the beginning of my xml file below -

Quote
<menu>
   <item caption="Home" link="index.php" title="Home Page"/>
   <item caption="NWS Website Boston/Norton" link="http://weather.gov/box" Title="NWS Boston Office (Norton)" target="_blank"/>
   <item wxonly="VWS" caption="Mesonet" title="Local Weather Exchange Stations" link="wxmesonet.php"/>
   <item caption="Weather Display Live" link="wxwdl.html" title="Live Data" target="_blank"/>   
   <item caption="Radar">
      <item caption="Regional Radar" link="https://go.usa.gov/xGfWX" target="_blank"/>
       <item caption="Local Radar" link="wxradar.php" title="Radar"/>
      <item caption="NOAA - Boston Radar" link="wxboxradar.php"/>
      <item caption="Regional_CONUS" link="wxnwsradar.php"/>
      <item caption="Wundermap Radar" link="https://www.wunderground.com/wundermap" target="_blank"/>
<!--
      <item caption="GRLevel3 Radar" link="wxgr3radar.php" title="NEXRAD Radar using GRLevel3" />
-->
   </item>
   <item caption="Lightning" link="https://www.lightningmaps.org/?lang=en#m=oss;t=3;s=0;o=0;b=0.00;ts=0;y=42.7087;x=-71.9083;z=8;d=2;dl=2;dc=0;tr=1" target="_blank"/>
   <item Caption="Models" title="Forecast Models">
      <item caption="GFS">      
         <item caption="MSLP and Precip" link="wxgfs-precip.php"/>
         <item caption="Temp" link="wxgfs-temp.php"/>
      </item>   
   <item caption="Nearby Buoys" title="Northeast Bouys" link="wxbouy.php"/>
-->
   <item caption="Local Forecast" title="Local Weather outlook">
      <item caption="Forecast details" link="wxforecastmap.php"/>
      <item caption="Forecast-Old Style" link="wxforecast.php"/>
      <item caption="Graphical Forecast" link="wxgraphicalfc.php"/>
      <item caption="Dark Sky Forecast" link="https://darksky.net/details/42.5562,-71.8821/us12/en" target="_blank"/>
      <item caption="NWS 3 Day Forecast" link="wxus3dwpcfrontfc.php"/>
      <item caption="NWS 3-7 Day Forecast" link="wxwpcmedr.php"/>   
      <item caption="Forecast Discussion" link="wxforecast-discussion.php"/>
      <item caption="Winter Forcast" link="https://www.weather.gov/box/winter" target="_blank"/>
      <item caption="UV Index Forecast" link="wxuvforecast.php"/>
      <item caption="Air Quality" link="wxaqirssV2.php"/>
      <item caption="Atlantic Surface Analysis" link="wx_atlantic_surface_analysis.php" target="_blank"/>
   </item>

Thanks, John
John
Westminster, MA USA

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Flyout menu Question
« Reply #3 on: March 12, 2022, 12:04:45 PM »
Here you go.. try the attached (rename to flyout-menu.xml)

The main change was to use
Code: [Select]
  <item caption="Lightning" link="https://www.lightningmaps.org/?lang=en#m=oss;t=3;s=0;o=0;b=0.00;ts=0;y=42.7087;x=-71.9083;z=8;d=2;dl=2;dc=0;tr=1" target="_blank"/>
  <item Caption="Models" title="Forecast Models">
    <item caption="GFS">   
      <item caption="MSLP and Precip" link="wxgfs-precip.php"/>
      <item caption="Temp" link="wxgfs-temp.php"/>
    </item>
  </item>   
  <item caption="Nearby Buoys" title="Northeast Bouys" link="wxbouy.php"/>
  <item caption="Local Forecast" title="Local Weather outlook">
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: Flyout menu Question
« Reply #4 on: March 12, 2022, 01:30:38 PM »
Thanks Ken, looks like I missed a a 2nd "</item>". I appreciate the help, it works fine now.

John
John
Westminster, MA USA