<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Treeview - Albero]]></title><description><![CDATA[<p dir="auto">Salve,<br />
volevo sapere come fosse possibile realizzare (se avete qualche link, spezzone di codice...) il classico menù ad albero tenendo presente che le categorie e le sottocategorie sono prese dal database e che a sinistra della scritta sia presente il classico quadratino con il + se il menù è espandibile e - se non lo è.</p>
<p dir="auto">|+| Categoria<br />
---|+| Sottocategoria<br />
-------|-| Prodotto 1</p>
<p dir="auto">Grazie <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/6551d194-c64c-4e45-9dcf-2a85dc41b3fb-sun.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--sun" style="height:1.4em;width:auto;vertical-align:middle" title=":sun:" alt="" /></p>
]]></description><link>https://dev.connect.gt/topic/175515/treeview-albero</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 13:46:11 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/175515.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 11 Aug 2012 12:57:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Treeview - Albero on Sat, 11 Aug 2012 17:29:02 GMT]]></title><description><![CDATA[<p dir="auto">Lo schema è questo:</p>
<p dir="auto">|+| Categoria 1<br />
---|+| SottoCategoria A<br />
----|-|Prodotto AA1<br />
----|-|Prodotto AA2<br />
----|-|Prodotto AA3<br />
---|+| SottoCategoria B<br />
----|-|Prodotto BB1<br />
----|-|Prodotto BB2<br />
----|-|Prodotto BB3</p>
<p dir="auto">|+| Categoria 2<br />
---|+| SottoCategoria C<br />
----|-|Prodotto CC1<br />
----|-|Prodotto CC2<br />
----|-|Prodotto CC3<br />
---|+| SottoCategoria D<br />
----|-|Prodotto DD1<br />
----|-|Prodotto DD2<br />
----|-|Prodotto DD3</p>
<p dir="auto">La tabella Categoria sarà intuitivamente composta così:<br />
id_cat<br />
nome_cat (es. Condomini)</p>
<p dir="auto">La tabella Sottocategoria:<br />
id_scat<br />
id_cat<br />
nome_scat (es. inquilini)</p>
<p dir="auto">La tabella Prodotti:<br />
id_prod<br />
id_cat<br />
id_scat<br />
nome_prod (es. stanze della casa)</p>
<p dir="auto">Quindi ogni nodo non sarà preimpostato ma dovrà essere generato dal database!</p>
]]></description><link>https://dev.connect.gt/post/1082040</link><guid isPermaLink="true">https://dev.connect.gt/post/1082040</guid><dc:creator><![CDATA[nofcfro]]></dc:creator><pubDate>Sat, 11 Aug 2012 17:29:02 GMT</pubDate></item><item><title><![CDATA[Reply to Treeview - Albero on Sat, 11 Aug 2012 14:34:50 GMT]]></title><description><![CDATA[<p dir="auto">L'albero che fa al caso mio può essere così: wwwPUNTOdestroydropPUNTOcom/javascripts/tree/default.html<br />
Solo che le categorie e le sottocategorie non devono essere statiche ma popolate da un database, quindi pensavo ad un ciclo WHILE mysql_fetch_array.</p>
<p dir="auto">Come posso renderlo dinamico???</p>
<pre><code class="language-html">&lt;script type="text/javascript"&gt;        &lt;!--


        d = new dTree('d');


        d.add(0,-1,'My example tree');
        d.add(1,0,'Node 1','example01.html');
        d.add(2,0,'Node 2','example01.html');
        d.add(3,1,'Node 1.1','example01.html');
        d.add(4,0,'Node 3','example01.html');
        d.add(5,3,'Node 1.1.1','example01.html');
        d.add(6,5,'Node 1.1.1.1','example01.html');
        d.add(7,0,'Node 4','example01.html');
        d.add(8,1,'Node 1.2','example01.html');
        d.add(9,0,'My Pictures','example01.html','Pictures I\'ve taken over the years','','','img/imgfolder.gif');
        d.add(10,9,'The trip to Iceland','example01.html','Pictures of Gullfoss and Geysir');
        d.add(11,9,'Mom\'s birthday','example01.html');
        d.add(12,0,'Recycle Bin','example01.html','','','img/trash.gif');


        document.write(d);


        //--&gt;
    &lt;/script&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1082039</link><guid isPermaLink="true">https://dev.connect.gt/post/1082039</guid><dc:creator><![CDATA[nofcfro]]></dc:creator><pubDate>Sat, 11 Aug 2012 14:34:50 GMT</pubDate></item></channel></rss>