Template:Auto List to Icons: Difference between revisions
m (fix campground anchor) |
m (move div tag) |
||
Line 28: | Line 28: | ||
Auto table | Auto table | ||
{{List to Icons Table|#userparam=intro}} | {{List to Icons Table|#userparam=intro}} | ||
{{List to Icons Table|#userparam=header|header=<div id="activities">Nature Activities (hiking, biking, etc.) | {{List to Icons Table|#userparam=header|header=<div id="activities">Nature Activities (hiking, biking, etc.) (Infobox Icon Type: Activities)</div>}} | ||
{{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Activities]] | {{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Activities]] | ||
|mainlabel=image | |mainlabel=image | ||
Line 40: | Line 40: | ||
|named args=yes | |named args=yes | ||
}} | }} | ||
{{List to Icons Table|#userparam=header|header=<div id="features">Features within the park or along the trail | {{List to Icons Table|#userparam=header|header=<div id="features">Features within the park or along the trail (Infobox Icon Type: Features)</div>}} | ||
{{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Features]] | {{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Features]] | ||
|mainlabel=image | |mainlabel=image | ||
Line 52: | Line 52: | ||
|named args=yes | |named args=yes | ||
}} | }} | ||
{{List to Icons Table|#userparam=header|header=<div id="amenities">Park Amenities | {{List to Icons Table|#userparam=header|header=<div id="amenities">Park Amenities (Infobox Icon Type: Park Amenities)</div>}} | ||
{{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Park Amenities]] | {{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Park Amenities]] | ||
|mainlabel=image | |mainlabel=image | ||
Line 64: | Line 64: | ||
|named args=yes | |named args=yes | ||
}} | }} | ||
{{List to Icons Table|#userparam=header|header=<div id="lodging">Lodging options within the park | {{List to Icons Table|#userparam=header|header=<div id="lodging">Lodging options within the park (Infobox Icon Type: Lodging)</div>}} | ||
{{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Lodging]] | {{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Lodging]] | ||
|mainlabel=image | |mainlabel=image | ||
Line 76: | Line 76: | ||
|named args=yes | |named args=yes | ||
}} | }} | ||
{{List to Icons Table|#userparam=header|header=<div id="campground">Campground amenities | {{List to Icons Table|#userparam=header|header=<div id="campground">Campground amenities (Infobox Icon Type: Campground Amenities)</div>}} | ||
{{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Campground Amenities]] | {{#ask:[[Category:Infobox Icons]][[Infobox Icon Type::Campground Amenities]] | ||
|mainlabel=image | |mainlabel=image |
Revision as of 10:18, 22 December 2019
Semantic keywords based on ask:
Beaches, Boating, Caving, Climbing, Disc Golf, ATV, Biking, Camping, Dogs, Fishing, Hiking, Horses, Skiing, Waterfalls, Fast Food Grill, Golf, Group Campground, 20 amp electrical, 30 amp electrical, 50 amp electrical, Cabins, Geocaching, Hunting, Showers, Sports, Clothes Washing, Backpacking, Campground, Camp Store, Dump station, Lodge/Inn/Hotel, Site water, Wi-Fi, Lakes, Mountains, No Dogs, Picnicking, Playgrounds, Pools, Restaurant, Rivers, Rustic Cabins, Vistas, Tent only
Icon types based on ask:
Full list:
Park Amenities, Activities, Activities, Activities, Park Amenities, Activities, Activities, Activities, Lodging, Activities, Activities, Activities, Activities, Features, Park Amenities, Park Amenities, Lodging, Campground Amenities, Campground Amenities, Campground Amenities, Lodging, Activities, Activities, Campground Amenities, Park Amenities, Campground Amenities, Lodging, Lodging, Campground Amenities, Campground Amenities, Lodging, Campground Amenities, Campground Amenities, Features, Features, Activities, Lodging, Park Amenities, Campground Amenities, Park Amenities, Park Amenities, Park Amenities, Features, Lodging, Features, Campground Amenities
Unique list:
Park Amenities, Activities, Lodging, Features, Campground Amenities, Activities, Lodging, Campground Amenities, Park Amenities
Auto table
How this works:
- Create an array called 'iconslist' of the keywords found in a query of all pages under the category Category:Infobox Icons
- Make an array called 'list' from the passed parameter names list
- Make an array called 'noiconsitems' which is the arraydiff of the first two created arrays (items on the passed list that don't have an icon)
- Make a fourth array 'iconitems' which is the intersection of the first two arrays (items on the passed list that do have an icon)
- For each iconitems, find the keyword matching image and show it
- Then finally, list the noiconsitems last
Edit the page to see the details.