<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://fbb.just4test.de/extern.php?action=feed&amp;tid=3805&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Informationen für CMS/made simple / 3. menü-LVL per smarty auslesen.]]></title>
		<link>http://www.cmsmadesimple.de/forum/viewtopic.php?id=3805</link>
		<description><![CDATA[Die aktuellsten Beiträge in 3. menü-LVL per smarty auslesen..]]></description>
		<lastBuildDate>Fri, 14 Mar 2014 10:11:36 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: 3. menü-LVL per smarty auslesen.]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30125#p30125</link>
			<description><![CDATA[<p>Ist Deine Zielstruktur wirklich richtig so?<br />Laut Deinem Beispiel willst Du nur die <em>zweite </em>Ebene in einem &lt;div&gt; wrappen.<br />Nicht die dritte.</p><p>Ich verstehe zwar nicht <em>warum </em>Du das so machen willst, aber so geht&#039;s:</p><p>Zunächst brauchst Du dieses <em>number_of_levels=3</em> bzw. <em>collapse=0</em> im Menü-Aufruf um die 3. Ebene mit ausgegeben zu bekommen.</p><p>Und dann musst Du ans Menü-Template ran (Layout -&gt; Menu Manager). <br />Das mitgelieferte Template &quot;simple_navigation.tpl&quot; sieht im Prinzip so aus:</p><div class="codebox"><pre><code>&lt;li&gt; LVL1 (1.Baum)
    &lt;ul&gt;
        &lt;li&gt; LVL2- (1.1 Nadelbaum)
            &lt;ul&gt;
                &lt;li&gt; LVL3- (1.1.1 Tanne )</code></pre></div><p>Du willst also anstelle der &lt;ul&gt; lieber &lt;ol&gt; haben.<br />Importiere das Menü-Template &quot;simple_navigation.tpl&quot; in die Datenbank.<br />Ändere im Seitentemplate den Menü-Aufruf und füge das neue Template hinzu:</p><div class="codebox"><pre><code>{menu loadprops=0 collapse=&#039;0&#039; template=&#039;DeinTemplate&#039;}</code></pre></div><p>Dann suche in deinem Menü-Template nach &lt;ul&gt; bzw. &lt;/ul&gt; und ändere es in &lt;ol&gt; bzw. &lt;/ol&gt;.<br />Im Template wirst Du da z.B. sowas finden:</p><div class="quotebox"><blockquote><div><p>{repeat string=&quot;<strong><span style="color: red">&lt;ul&gt;</span></strong>&quot; times=$node-&gt;depth-$node-&gt;prevdepth}</p></div></blockquote></div><p>bzw. das:</p><div class="quotebox"><blockquote><div><p>{repeat string=&quot;&lt;/li&gt;<strong><span style="color: red">&lt;/ul&gt;</span></strong>&quot; times=$node-&gt;prevdepth-$node-&gt;depth}</p></div></blockquote></div><p>und das:</p><div class="quotebox"><blockquote><div><p>{repeat string=&quot;&lt;/li&gt;<strong><span style="color: red">&lt;/ul&gt;</span></strong>&quot; times=$node-&gt;depth-1}&lt;/li&gt;</p></div></blockquote></div><p>ändere das in:</p><div class="quotebox"><blockquote><div><p>{repeat string=&quot;<strong><span style="color: red">&lt;ol&gt;</span></strong>&quot; times=$node-&gt;depth-$node-&gt;prevdepth}</p><p>{repeat string=&quot;&lt;/li&gt;<strong><span style="color: red">&lt;/ol&gt;</span></strong>&quot; times=$node-&gt;prevdepth-$node-&gt;depth}</p><p>{repeat string=&quot;&lt;/li&gt;<strong><span style="color: red">&lt;/ol&gt;</span></strong>&quot; times=$node-&gt;depth-1}&lt;/li&gt;</p></div></blockquote></div><p>Dann sieht das Menü so aus:</p><div class="codebox"><pre><code>&lt;li&gt; LVL1 (1.Baum)
    &lt;ol&gt;
        &lt;li&gt; LVL2- (1.1 Nadelbaum)
            &lt;ol&gt;
                &lt;li&gt; LVL3- (1.1.1 Tanne )</code></pre></div><p>Für den Fall, dass Du <em>alle </em>Unterebenen in ein &lt;div&gt; wrappen willst musst Du nun im Menü-Template an der gleichen Stelle, wo Du &lt;ul&gt; in &lt;ol&gt; geändert hast einfach das &lt;div&gt; davor bzw. bei &lt;/ol&gt; das &lt;/div&gt; dahinter setzen:</p><div class="quotebox"><blockquote><div><p>{repeat string=&quot;<strong><span style="color: red">&lt;div&gt;</span></strong>&lt;ol&gt;&quot; times=$node-&gt;depth-$node-&gt;prevdepth}</p><p>{repeat string=&quot;&lt;/li&gt;&lt;/ol&gt;<strong><span style="color: red">&lt;/div&gt;</span></strong>&quot; times=$node-&gt;prevdepth-$node-&gt;depth}</p><p>{repeat string=&quot;&lt;/li&gt;&lt;/ol&gt;<strong><span style="color: red">&lt;/div&gt;</span></strong>&quot; times=$node-&gt;depth-1}&lt;/li&gt;</p></div></blockquote></div><p>Dann sieht das Menü so aus:</p><div class="codebox"><pre><code>&lt;li&gt; LVL1 (1.Baum)
    &lt;div&gt;
        &lt;ol&gt;
            &lt;li&gt; LVL2- (1.1 Nadelbaum)
                &lt;div&gt;
                    &lt;ol&gt;
                        &lt;li&gt; LVL3- (1.1.1 Tanne )</code></pre></div><p>Wenn Du aber nur bestimmte Ebenen in ein &lt;div&gt; wrappen willst, dann musst Du an diesen Stellen eine Abfrage nach der&#160; Ebene machen. Hier mal das komplette modifizierte Template &quot;simple_navigation.tpl&quot; für die zweite Ebene:</p><div class="codebox"><pre class="vscroll"><code>{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}

{assign var=&#039;number_of_levels&#039; value=10000}
{if isset($menuparams.number_of_levels)}
  {assign var=&#039;number_of_levels&#039; value=$menuparams.number_of_levels}
{/if}

{if $count &gt; 0}
    
    &lt;ol&gt;
    
    {foreach from=$nodelist item=node}
        {if $node-&gt;depth &gt; $node-&gt;prevdepth}
            
            {if $node-&gt;depth == 2}
            
                &lt;div&gt;
                
            {/if}
            {repeat string=&quot;&lt;ol&gt;&quot; times=$node-&gt;depth-$node-&gt;prevdepth}
            
        {elseif $node-&gt;depth &lt; $node-&gt;prevdepth}
            {repeat string=&quot;&lt;/li&gt;&lt;/ol&gt;&quot; times=$node-&gt;prevdepth-$node-&gt;depth}
            {if $node-&gt;depth == 1}
            
                &lt;/div&gt;
                
            {/if}
            
            &lt;/li&gt;
            
        {elseif $node-&gt;index &gt; 0}
            
            &lt;/li&gt;
            
        {/if}
    
        {if $node-&gt;parent == true or $node-&gt;current == true}
            {assign var=&#039;classes&#039; value=&#039;menuactive&#039;}
            {if $node-&gt;parent == true}
                {assign var=&#039;classes&#039; value=&#039;menuactive menuparent&#039;}
            {/if}
            {if $node-&gt;children_exist == true and $node-&gt;depth &lt; $number_of_levels}
                {assign var=&#039;classes&#039; value=$classes|cat:&#039; parent&#039;}
            {/if}
            
            &lt;li class=&quot;{$classes}&quot;&gt;&lt;a class=&quot;{$classes}&quot; href=&quot;{$node-&gt;url}&quot;&gt;&lt;span&gt;{$node-&gt;depth} - {$node-&gt;menutext}&lt;/span&gt;&lt;/a&gt;

        {elseif $node-&gt;children_exist == true and $node-&gt;depth &lt; $number_of_levels and $node-&gt;type != &#039;sectionheader&#039; and $node-&gt;type != &#039;separator&#039;}
        
            &lt;li class=&quot;parent&quot;&gt;&lt;a class=&quot;parent&quot; href=&quot;{$node-&gt;url}&quot;&gt;&lt;span&gt;{$node-&gt;depth} - {$node-&gt;menutext}&lt;/span&gt;&lt;/a&gt;

        {elseif $node-&gt;current == true}
        
            &lt;li class=&quot;currentpage&quot;&gt;&lt;h3&gt;&lt;span&gt;{$node-&gt;depth} - {$node-&gt;menutext}&lt;/span&gt;&lt;/h3&gt;

        {elseif $node-&gt;type == &#039;sectionheader&#039;}
        
            &lt;li class=&quot;sectionheader&quot;&gt;&lt;span&gt;{$node-&gt;depth} - {$node-&gt;menutext}&lt;/span&gt;

        {elseif $node-&gt;type == &#039;separator&#039;}
        
            &lt;li class=&quot;separator&quot; style=&quot;list-style-type: none;&quot;&gt; &lt;hr /&gt;

        {else}
        
            &lt;li&gt;&lt;a href=&quot;{$node-&gt;url}&quot;&gt;&lt;span&gt;{$node-&gt;depth} - {$node-&gt;menutext}&lt;/span&gt;&lt;/a&gt;

        {/if}

    {/foreach}
    {repeat string=&quot;&lt;/li&gt;&lt;/ol&gt;&quot; times=$node-&gt;depth-1}
    {if $node-&gt;depth &gt; 1}
    
        &lt;/div&gt;
    {/if}
    
    &lt;/li&gt;
&lt;/ol&gt;

{/if}</code></pre></div><p>Hoffe, das ist das was Du brauchst.</p>]]></description>
			<author><![CDATA[dummy@example.com (NaN)]]></author>
			<pubDate>Fri, 14 Mar 2014 10:11:36 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30125#p30125</guid>
		</item>
		<item>
			<title><![CDATA[Re: 3. menü-LVL per smarty auslesen.]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30118#p30118</link>
			<description><![CDATA[<p>Willkommen,</p><p>ich verstehe leider die Frage nicht. Was heißt &quot;dazwischen&quot;?</p><p>Auch deinen angedeuteten Code mit dem div mitten in der Liste kann ich nicht so recht nachvollziehen.</p><p>Über css kannst du eigentlich jede Menü-Ebene wrappen. Nämlich über die ul bzw ol bei dir. UL kannst du genauso&#160; behandeln wie ein div.</p><p>bsp:</p><p>#menu ul {deine styles 1. ebene;}</p><p>#menu li ul {deine styles 2. ebene;} </p><p>#menu li ul li ul {deine styles 3. ebene;}</p>]]></description>
			<author><![CDATA[dummy@example.com (antibart)]]></author>
			<pubDate>Thu, 13 Mar 2014 15:55:17 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30118#p30118</guid>
		</item>
		<item>
			<title><![CDATA[3. menü-LVL per smarty auslesen.]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30116#p30116</link>
			<description><![CDATA[<p>Hi ihrs,</p><p>hier ist gerade ein Anfänger am Werk.<br />ich versuche gerade die page-navigation so umzuschreiben dass ich das 3te level auch ausgeworfen bekomme.</p><p>Und NEIN, {menu number_of_levels=&quot;3&quot; } hilft mir nichts, weil ich &quot;dazwischen&quot; muss. </p><p>Wie komm ich von dem standartcode (?) in der page-navi dazu mir die dritte ebene mit auszugeben, aber so dass ich sie wrappen kann.</p><p>meine (ziel-) struktur sieht so aus:</p><p>&#160; &#160; &#160; &#160; -&lt;li&gt; LVL1 (1.Baum)<br />&#160; &#160; &#160; &#160; -- &lt;div&gt;<br />&#160; &#160; &#160; &#160; ------ &lt;ol&gt;<br />&#160; &#160; &#160; &#160; ----------- &lt;li&gt;<br />&#160; &#160; &#160; &#160; ---------------- LVL2- (1.1 Nadelbaum)<br />&#160; &#160; &#160; &#160; -------------------- &lt;ol&gt;<br />&#160; &#160; &#160; &#160; ------------------------ &lt;li&gt; LVL3- (1.1.1 Tanne )</p><p>kann mir jemand einen tipp geben?<br />einen link?</p><p>(bitte nicht google oder die forensuche. da komm ich immer auf den selben threads raus,...)</p><p>Danke!!!!</p><p>cmsms: 1.10.3</p>]]></description>
			<author><![CDATA[dummy@example.com (ichbinsnur)]]></author>
			<pubDate>Thu, 13 Mar 2014 13:58:54 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30116#p30116</guid>
		</item>
	</channel>
</rss>
