<div dir="ltr"><div><div><div><div><div><div>I haven't used a custom pagelist template before, but I think it can replace a set of markup and functions that now only work on individual pages. I hope there is a cleaner, and more powerful way to do this with pagelist and a custom pagelist template. Here is what I have.<br>
<br></div>1. I have a group of pages for the plants in my garden collection. Each page has the location of each planting, such as<br></div>(:plant x=10 y=20)<br></div>(:plant x=100 y=250)<br></div>where x and y correspond to the x,y pixel location on a map of my garden.<br>
</div>2. I have a markup that sees the (:plant:) markup and calls a function that counts the number of instances of the markup and also saves the x and y coordinates in some arrays called mapx and mapy.<br></div>3. I show the garden map with the markup (:gardenmap:) which calls the function below. If this markup is not included, the map is not displayed. I need this feature because I may not have the coordinates, but I want to catalog the plant as being in my collection. The function of GardenMap() is to show the map of my garden, and then a marker on top of this image showing where each plant is located.<br>
<div><div><div><div><div><div><div><br>function GardenMap($pagename)<br>{ <br>global $mapx,$mapy,$pcount;<br> <br>$out = "<div style=\"background-image:url(<a href="http://ediblelandscape.org/images/other/gardenmap.jpg);padding:0px;width:668px;height:263px;border:1px">http://ediblelandscape.org/images/other/gardenmap.jpg);padding:0px;width:668px;height:263px;border:1px</a> solid black;\">";<br>
<br>foreach($mapx as $index=>$value)<br> {<br>$marker=$index+1;<br>$out=$out."<plant style=\"position: relative; left: $mapx[$index]px; top: $mapx[$index]px;color:red; background-color:white;\">$marker</plant>";<br>
}<br><br>$out=$out."</div>";<br><br>return Keep($out);<br>}<br><br><br></div><div>I think all of this can be replaced by pagelist and a custom pagelist template. I could use some guidance.<br>Thanks,<br>
</div><div>Mark<br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 26, 2013 at 4:36 PM, Mark Lee <span dir="ltr"><<a href="mailto:mark.lee.phd@gmail.com" target="_blank">mark.lee.phd@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I guess I can make a copy of the pagelist script and add any feature I want. I think I will explore that next.<br>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 26, 2013 at 7:38 AM, Mark Lee <span dir="ltr"><<a href="mailto:mark.lee.phd@gmail.com" target="_blank">mark.lee.phd@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>How can I use the results of (:pagelist ...:) in a function? I a PTV in some pages in a group that holds a number. such as (:size x=10:). I want to generate a line of html for each page found if the value is in a range. I can display the values in a table using pagelist, but I have other ideas than just making a table.<span><font color="#888888"><br>
</font></span></div><span><font color="#888888">-Mark<br></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>