We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 149
    • 14 Posts
    Всем, привет.
    Решил попробовать для создания сайта MODx...
    До этого был опыт создания сайтов на движке LDU (neocrome.ru) и один платный двиг, но не помню какой sad мне его подогнали и сказали делай smiley

    Вообщем в прикрепленном файле мини схема того чего я хочу...
    Два меню, одно основное, второе как подменю к каждому пункту из основного.
    Плюс справа блок меняющейся информации, все зависит от того на каком пункте меню находится посетитель сайта....

    Вообщем скажите такое возможно на MODx?
    Если да то дайте наводки )))
    Просто не могу разобраться с тем как работает шаблон... sad не крутит голова что-то никак...
    если тупо в главном меню дать ссылки на страницы с шв скажем 1, 2 и 3 то как мне закодить эти страницы с разным вторым меню? ))) извините что на ломоном руском выражаю ломанные мысли )
      • 33694
      • 742 Posts
      Возможно. Твой случай, можно сказать, самая простая задача.

      Два меню, одно основное, второе как подменю к каждому пункту из основного.

      В двух словах:
      1) Создаешь несколько разделов в дереве. Каждый разел - будет твоим пунктом основного меню.
      2) У каждого раздела созданного в п. #1, создаешь дочерние документы - они будут пунктами подменю.
      3) Для орагиназации того, что ты нарисовал, тубе нужно будет разобраеться как вызвать WayFinder или ему подобные. Есть простой снипет GetGhild (не помню точно названия) - он выводит ссылки на дочерние документы текущего.

      Дерзай smiley
        • 897
        • 1,620 Posts
        стандартный DropMenu справиться с этим
          "Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein."

          Не используйте Revo для "просто сайтов". Используйте Evo

          Who can defeat the Russian bear?
          • 149
          • 14 Posts
          Спасибо откликнувшимся.
          Помощь опять ваша нужна, о гуру MODx ))

          Вообщем на данный момент я имею реьд код главной страницы.
          ХОчу по умолчанию её сделать как первое подменю первого меню )
          Это делается все просто как я понял, страницу Home помещаем в папку отведенную под первое меню.

          Но вот кто скажет как закодить мне страницу Home и другие странцы в этой папке в html? )))
          Все так как показано на картинке в первом посте! Меню - не выпадающее. Главное отдельно, втростепенное отдельно.
          Страцы разбиты на две колонки.
          Слева меню которое будет изменятся в зависимости от нахождения пользователя, справа блок информации который тоже меняется...

          что мне тут юзать надо? ) подскажите плиз... )))

          П.С. Походу таким путем можно тема может превратиться в подробный фак для новичков в MODx ) правда если мои вопросы не остануться без ответа (
            • 22301
            • 1,084 Posts
            тема может превратиться в подробный фак, но для новичков не только в modx:)

            modx с точки зрения освоения, настройки и т.д. под нужды именно новичков подходит как нельзя лучше! это моё личное мнение smiley

            что значит -- "закодить"?

            можно долго рассказывать про систему шаблонов и сниппетов, но лучше освоить 2 ссылки, вдумчиво:)

            1. http://modx.ru/demo/
            2. http://ru.wikibooks.org/wiki/MODx

            касательно первой ссылки... лучше покопаться в демке денёк, чем постить фак-вопросы и постоянно пребывать в ожидании ответов wink
            думаю, что у многих на форуме освоение modx начиналось с ковырялова в демо-сайте, который разворачивается при установке системы, и было время, когда русскоязычной поддержки не было:)
              [img]http://jurist-info.ru/pic/rrr.jpg[/img]

              Безжалостный пияр!
              Artima -- неуч!
              Осторожно: преступная локализация -- modx-cms.ru
              Баштанник Андрей -- мегапрограммер из Белоруссии и поедатель говна, очень критично настроенный молодой человек!

              Дисклеймер для общительных: даю сам себе право транслировать в открытый эфир содержание лички, just for fun
              • 897
              • 1,620 Posts
              просто вопрос скорее к html-верстке чем к особенностям MODx
                "Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein."

                Не используйте Revo для "просто сайтов". Используйте Evo

                Who can defeat the Russian bear?
                • 149
                • 14 Posts
                Не люди, html я уже написал. он у меня готов. )
                Я не могу понять как мне для каждой страницы написать свой html код, т.е. перенести его в MODх... если в шаблон, забивать, то правая часть будет как мне надо, а левая ( где доп меню) статична... а мне надо чтоб она тоже менялась )

                Вот короче часть кода меню:
                <td class="grey_menu" align="left">
                		<table class="tab_all">
                			<tr>
                			<td>
                			</td>
                			<td class="pad_all4"><img src="http://localhost/modx/assets/templates/k/images/arrow.gif" alt="" height="11" width="9"><a href="/about/lantmannen_group/" class="act_sec">О нас</a></td>
                			</tr>
                			<tr>
                			<td>
                			</td>
                			<td><img src="http://localhost/modx/assets/templates/k/images/dot.gif" alt="" height="5" width="138"></td>
                			</tr>
                			<tr>
                			<td>
                			</td>
                			<td class="pad_all4"><a href="/about/partners/">Новости</a></td>
                			</tr>	
                			<tr>
                			<td width="9"><img src="http://localhost/modx/assets/templates/k/images/spacer.gif" alt="" height="1" width="9"></td>
                			<td>
                			</td>
                		</table>
                	</td>
                	</tr>


                Как видите, перед пунктом меню стаит картинка ) значит юзер находится в разделе "о нас"
                а если он нажмет на "новости" то нужен будет код уже такой:

                <td class="grey_menu" align="left">
                		<table class="tab_all">
                			<tr>
                			<td>
                			</td>
                			<td class="pad_all4"><a href="/" class="act_sec">О нас</a></td>
                		        </tr>
                			<tr>
                			<td>
                			</td>
                			<td><img src="http://localhost/modx/assets/templates/k/images/dot.gif" alt="" height="5" width="138"></td>
                			</tr>
                			<tr>
                			<td>
                			</td>
                			<td class="pad_all4"><img src="http://localhost/modx/assets/templates/k/images/arrow.gif" alt="" height="11" width="9"><a href="/">Новоcти</a></td>
                			</tr>			
                			<tr>
                			<td width="9"><img src="http://localhost/modx/assets/templates/k/images/spacer.gif" alt="" height="1" width="9"></td>
                			<td>
                			</td>
                		</table>
                	</td>
                        </tr>


                А если это забить в шаблон, то картинка ( там стрелка) ) останется на верхнем меню.

                Конечно можно это прописать в css и меню сделать в номальном виде типа списка <ul><li></li> </ul> но мне в данном вареанте такое не подходит. Вот. может так понятнее будет...
                  • 22301
                  • 1,084 Posts
                  всё понятно.
                  дело в том, что меню генерится автоматом. за это отвечает php-скрипт -- сниппет. самый простой способ разделить программинг, вёрстку и оформление -- это делать меню "стандартно", через ul. рыбку съесть и на лошадке покататься в данном случае поможет какой-нить php-мастер, заморочившись над сниппетом для меню, затащив внутрь сниппета табличные теги и т.д.

                  рекомендую сделать, всё-таки, меню на ul-списке, а оформить меню полностью можно и через css. да и нарезка в таком случае упрощается, код становится модно семантическим...

                  да, если что, можно глянуть, как с меню и картинками я поступил здесь http://jurist-info.ru -- не образец, но код посмотреть и css можно grin
                    [img]http://jurist-info.ru/pic/rrr.jpg[/img]

                    Безжалостный пияр!
                    Artima -- неуч!
                    Осторожно: преступная локализация -- modx-cms.ru
                    Баштанник Андрей -- мегапрограммер из Белоруссии и поедатель говна, очень критично настроенный молодой человек!

                    Дисклеймер для общительных: даю сам себе право транслировать в открытый эфир содержание лички, just for fun
                    • 22301
                    • 1,084 Posts
                    69, åñòü ïîäîçðåíèå, ÷òî òû ïûòàåøüñÿ ïðèâèíòèòü êàêîé-òî øàáëîí, ÷òî, ïðè ñóùåñòâóþùåé ïîääåðæêå øàáëîíîâ â modx, ïîõîæå íà ïóòøåñòâèå èç Ìîñêâû â Àâñòðàëèþ ÷åðåç Ñåâåðíûé ïîëþñ smiley

                    Ñäåëàé ñíèïïåò, îáçîâè åãî êàê-íèòü, òèïà, GreyMenu. Â ñíèïïåò âñòàâü êîä (ýòî ïîäïðàâëåííîå DropMenu):

                    // ###########################################
                    // DropMenu                                  #
                    // ###########################################
                    // Configurable menu / navigation builder using UL tags
                    // Offers optional DIV wrappers for top level and nested menus (useful for hover zones)
                    // as well as configurable classes for the DIV, UL, and LI elements.  It even
                    // marks ancestors of and the current element with a hereClass (indicating you are here 
                    // and in this area of the site).  Also applies .last CSS class to final LI in each UL.
                    //
                    // Developed by Vertexworks.com and Opengeek.com
                    // Feel free to use if you keep this header and credits in place
                    //
                    // Inspired by List Site Map by Jaredc, SimpleList by Bravado, 
                    // and ListMenuX by OpenGeek
                    //
                    // Configuration parameters:
                    // 
                    // &menuName        - name of a placeholder for placing the output in the layout
                    // &topnavClass     - CSS class for styling the class assigned to the outermost UL
                    // 
                    // TO DO: configuration parameters above, more usage examples, CSS examples, output indenting
                    
                    // ###########################################
                    // Usage Examples                            #
                    // ###########################################
                    // Creates menu with wrapping DIV with id=myMenu, starting at the site root, two levels deep,
                    // with descriptions next to the links, and nested UL elements with class=nestedLinks; output
                    // of menu can be placed in layout using placeholder named myMenu ( e.g. [ +myMenu+ ] )
                    // [[DropMenu? &menuName=`myMenu` &startDoc=`0` &levelLimit=`2` &topdiv=`true` &showDescription=`true` &subnavClass=`nestedLinks`]]
                    //
                    // Creates topMenu from site root, including only 1 level, with class=topMenubar applied to the top level UL
                    // and class=activeLink applied to current page LI
                    // [[DropMenu? &menuName=`topMenu` &startDoc=`0` &levelLimit=`1` &topnavClass=`topMenubar` &here=`activeLink`]]
                    //
                    // Creates dropmenu 3 levels deep, with DIV wrappers around all nested lists styled with class=hoverZone
                    // and currentPage LI styled with class=currentPage
                    // [[DropMenu? &levelLimit=3 &subdiv=true &subdivClass=hoverZone &subnavClass=menuZone &here=currentPage]]
                    //
                    // Creates dropmenu of infinite levels, ordered by menutitle in descending order
                    // [[DropMenu?orderBy=menutitle&orderDesc=true]]
                    
                    // ###########################################
                    // Configuration parameters                  #
                    // ###########################################
                    
                    // $phMode [ true | false ]
                    // Whether you want it to output a [+placeholder+] or simply return the output.
                    // Defaults to false.
                    $phMode = false;
                    
                    // $menuName [ string ]
                    // Sets the name of the menu, placeholder, and top level DIV id (if topdiv 
                    // option is true). Set to "dropmenu" by default.
                    $phName = (!isset($phName)) ? 'dropmenu' : "$phName";
                    
                    // $siteMapRoot [int]
                    // The parent ID of your root. Default 0. Can be set in 
                    // snippet call with startDoc (to doc id 10 for example):
                    // [[DropMenu?startDoc=10]]
                    $siteMapRoot = 0;
                    
                    // $removeNewLines [ true | false ]
                    // If you want new lines removed from code, set to true. This is generally
                    // better for IE when lists are styled vertically. 
                    $removeNewLines = (!isset($removeNewLines)) ? false : ($removeNewLines==true);
                    
                    // $maxLevels [ int ]
                    // Maximum number of levels to include. The default 0 will allow all
                    // levels. Also settable with snippet variable levelLimit:
                    // [[DropMenu?levelLimit=2]]
                    $maxLevels = 0;
                    
                    
                    // $textOfLinks [ string ]
                    // What database field do you want the actual link text to be?
                    // The default is pagetitle because it is always a valid (not empty)
                    // value, but if you prefer it can be any of the following:
                    // menutitle, id, pagetitle, description, parent, alias, longtitle, introtext
                    // TO DO: set text to be first non-empty of an array of options
                    $textOfLinks = (!isset($textOfLinks)) ? 'pagetitle' : "$textOfLinks";
                    
                    // $titleOfLinks [ string ]
                    // What database field do you want the title of your links to be?
                    // The default is pagetitle because it is always a valid (not empty)
                    // value, but if you prefer it can be any of the following:
                    // menutitle, id, pagetitle, description, parent, alias, longtitle, introtext
                    $titleOfLinks = (!isset($titleOfLinks)) ? 'description' : "$titleOfLinks";
                    
                    // $pre [ string ]
                    // Text to append before links inside of LIs
                    $pre = (!isset($pre)) ? '' : "$pre";
                    
                    // $post [ string ]
                    // Text to append before links inside of LIs
                    $post = (!isset($post)) ? '' : "$post";
                    
                    // $selfAsLink [ true | false ]
                    // Define if the current page should be a link (true) or not (false)
                    $selfAsLink = (!isset($selfAsLink)) ? false : ($selfAsLink==true);
                    
                    // $hereClass [ string ]
                    // CSS Class for LI and A when they are the currently selected page, as well
                    // as any ancestors of the current page (YOU ARE HERE)
                    $hereClass = (!isset($hereClass)) ? 'here' : $hereClass;
                    
                    
                    
                    // $showDescription [true | false]
                    // Specify if you would like to include the description
                    // with the page title link.
                    $showDescription = (!isset($showDescription)) ? false : ($showDescription==true);
                    
                    // $descriptionField [ string ]
                    // What database field do you want the description to be?
                    // The default is description. If you specify a field, it will attempt to use it
                    // first then fall back until it finds a non-empty field in description, introtext,
                    // then longtitle so it really tries not be empty. It can be any of the following:
                    // menutitle, id, pagetitle, description, parent, alias, longtitle, introtext
                    // TO DO: set description to the first non-empty of an array of options
                    $descriptionField = (!isset($descriptionField)) ? 'description' : "$descriptionField";
                    
                    
                    // $topdiv [ true | false ]
                    // Indicates if the top level UL is wrapped by a containing DIV block
                    $topdiv = (!isset($topdiv)) ? false : ($topdiv==true);
                    
                    // $topdivClass [ string ]
                    // CSS Class for DIV wrapping top level UL
                    $topdivClass = (!isset($topdivClass)) ? 'topdiv' : "$topdivClass";
                    
                    // $topnavClass [ string ]
                    // CSS Class for the top-level (root) UL
                    $topnavClass = (!isset($topnavClass)) ? 'topnav' : "$topnavClass";
                    
                    
                    
                    // $useCategoryFolders [ true | false ]
                    // If you want folders without any content to render without a link to be used
                    // as "category" pages (defaults to true). In order to use Category Folders, 
                    // the template must be set to (blank) or it won't work properly.
                    $useCategoryFolders = (!isset($useCategoryFolders)) ? true : "$useCategoryFolders";
                    
                    // $categoryClass [ string ]
                    // CSS Class for folders with no content (e.g., category folders)
                    $categoryClass = (!isset($categoryClass)) ? 'category' : "$categoryClass";
                    
                    
                    
                    // $subdiv [ true | false ]
                    // Indicates if nested UL's should be wrapped by containing DIV blocks
                    // This is useful for creating "hover zones" 
                    // (see http://positioniseverything.net/css-dropdowns.html for a demo)
                    // TO CONSIDER: Setting a subdiv class at all turns on hover DIVs?
                    $subdiv = (!isset($subdiv)) ? false : ($subdiv==true);
                    
                    // $subdivClass [ string ]
                    // CSS Class for DIV blocks wrapping nested UL elements
                    $subdivClass = (!isset($subdivClass)) ? 'subdiv' : "$subdivClass";
                    
                    
                    
                    // $orderBy [ string ]
                    // Document field to sort menu by
                    $orderBy = (!isset($orderBy)) ? 'menuindex' : "$orderBy";
                    
                    // $orderDesc [true | false]
                    // Order results in descending order?  default is false
                    $orderDesc = (!isset($orderDesc)) ? false : ($orderDesc==true);
                    
                    // ###########################################
                    // End config, the rest takes care of itself #
                    // ###########################################
                    
                    $debugMode = false;
                    
                    // Initialize
                    $MakeMap = "";
                    $siteMapRoot = (isset($startDoc)) ? $startDoc : $siteMapRoot;
                    $maxLevels = (isset($levelLimit)) ? $levelLimit : $maxLevels;
                    $ie = ($removeNewLines) ? '' : "\n";
                    
                    // Overcome single use limitation on functions
                    global $MakeMap_Defined;
                    
                    if (!isset ($MakeMap_Defined)) {
                    	function filterHidden($var) {
                    		return (!$var['hidemenu']==1);
                    	}
                    	function filterEmpty($var) {
                    	    return (!empty($var));
                    	}
                    	function MakeMap($modx, $listParent, $listLevel, $description, $titleOfLinks, $maxLevels, $inside, $pre, $post, $selfAsLink, $ie, $activeLinkIDs, $topdiv, $topdivClass, $topnavClass, $subdiv, $subdivClass, $subnavClass, $hereClass, $useCategoryFolders, $categoryClass, $showDescription, $descriptionField, $textOfLinks, $orderBy, $orderDesc, $debugMode) {
                    
                    		$children = $modx->getActiveChildren($listParent, $orderBy, (!$orderDesc) ? 'ASC' : 'DESC', 'id, pagetitle, description, isfolder, parent, alias, longtitle, menutitle, hidemenu, introtext, content_dispo, contentType, type, template');
                    		// filter out the content that is set to be hidden from menu snippets
                    		$children = array_filter($children, "filterHidden");
                    		$numChildren = count($children);
                    
                    		if (is_array($children) && !empty($children)) {
                    
                    			// determine if it's a top category or not
                    			$toplevel = !$inside;
                    
                    			// build the output
                    			$topdivcls = (!empty($topdivClass)) ? ' class="'.$topdivClass.'"' : '';
                    			$topdivblk = ($topdiv) ? "<div$topdivcls>" : '';
                                            //$topnavclss = $children['id']; 
                    			$topnavcls = (!empty($topnavClass)) ? ' class="'.$topnavClass.'"' : ''; 
                    			$subdivcls = (!empty($subdivClass)) ? ' class="'.$subdivClass.'  '.$topnavclss.'"' : '';
                    			$subdivblk = ($subdiv) ? "<div$subdivcls>$ie" : '';
                    			$subnavcls = (!empty($subnavClass)) ? ' class="'.$subnavClass.'"' : '';
                    			$output = ($toplevel) ? "$topdivblk<ul$topnavcls>$ie" : "$ie$subdivblk<ul$subnavcls>$ie";
                    
                    			//loop through and process subchildren
                    			foreach ($children as $child) {
                    				// figure out if it's a containing category folder or not 
                    				$numChildren --;
                    				$isFolder = $child['isfolder'];
                    			        $itsEmpty = ($isFolder && ($child['template'] == '0'));
                    				$itm = "";
                    
                                    // if menutitle is blank fall back to pagetitle for menu link
                                    $textOfLinks = (empty($child[menutitle])) ? 'pagetitle' : "$textOfLinks"; 
                    
                    /////////////////////////////// If at the top level
                    				if (!$inside) 
                    				{
                    					$itm .= ((!$selfAsLink && ($child['id'] == $modx->documentIdentifier)) || ($itsEmpty && $useCategoryFolders)) ? 
                    // $pre.$child[$textOfLinks].$post . 
                       $pre.'<strong>'.$child[$textOfLinks].'</strong>'.$post .
                    (($debugMode) ? ' self|cat' : '') : '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$pre.$child[$textOfLinks].$post.'</a>';
                    					$itm .= ($debugMode) ? ' top' : '';
                    				}
                    /////////////////////////////// it's a folder and it's below the top level
                    				elseif ($isFolder && $inside) 
                    				{
                    				    
                    					$itm .= ((!$selfAsLink && ($child['id'] == $modx->documentIdentifier)) || ($itsEmpty && $useCategoryFolders)) ?
                    // $pre.$child[$textOfLinks].$post . 
                       $pre.'<strong>'.$child[$textOfLinks].'</strong>'.$post .
                    (($debugMode) ? 'subfolder T': '') : '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$pre.$child[$textOfLinks].$post.'</a>'. (($debugMode) ? ' subfolder F' :'');        					
                    				}
                    /////////////////////////////// it's a document inside a folder
                    				else 
                    				{
                    					$itm .= ($child['alias'] > '0' && !$selfAsLink && ($child['id'] == $modx->documentIdentifier)) ? '<strong>'.$child[$textOfLinks].'</strong>' : '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$child[$textOfLinks].'</a>';
                    					$itm .= ($debugMode) ? ' doc' : '';
                    				}
                    ///////////////////////////////				
                    
                                          $itm .= ($debugMode)? "$useCategoryFolders $isFolder $itsEmpty" : '';
                       					
                    				// loop back through if the doc is a folder and has not reached the max levels
                    				if ($isFolder && (($maxLevels == 0) || ($maxLevels > $listLevel +1))) {
                    					$itm .= MakeMap($modx, $child['id'], $listLevel +1, $description, $titleOfLinks, $maxLevels, true, $pre, $post, $selfAsLink, $ie, $activeLinkIDs, $topdiv, $topdivClass, $topnavClass, $subdiv, $subdivClass, $subnavClass, $hereClass, $useCategoryFolders, $categoryClass, $showDescription, $descriptionField, $textOfLinks, $orderBy, $orderDesc, $debugMode);
                    				}
                    
                    				if ($itm && !$selfAsLink && ($child['id'] == $modx->documentIdentifier)) {
                    					$output .= "    <li class=\"$hereClass". ($numChildren == 0 ? '_' : '')."\">$itm</li>$ie";
                    				}
                    				elseif ($itm) {
                    					if ($numChildren == 0) {
                    						$class = '';
                    					}
                    					if (is_array($activeLinkIDs)) {
                    
                     $hhh = '';
                    						if (in_array($child['id'], $activeLinkIDs)) {
                    							$class .= ($class ? '' : '').$hereClass;
                             $hhh = 1;
                    						}
                            
                    					}
                    					// it's an empty folder and using Category Folders
                    					if ($useCategoryFolders && $itsEmpty) {
                    						$class .= ($class ? 'pizda' : '').$categoryClass;
                    					}
                    					if ($class) {
                    						$class = ' class="'.$class.'"';
                    					}
                    					
                    					// TO DO: set description to the first non-empty of an array of options
                    					if ($showDescription && (!empty($child['$descriptionField']))) {
                    					    $desc = " – ".$child['$descriptionField'];
                    					} elseif ($showDescription && (!empty($child['description']))) {
                    					    $desc = ' – ' . $child['description'];
                    					} elseif ($showDescription && (!empty($child['introtext']))) {
                    					    $desc = ' – ' . $child['introtext'];
                    					} elseif ($showDescription && (!empty($child['longtitle']))) {
                    					    $desc = ' – ' . $child['longtitle'];
                    					} else {
                    					    $desc = '';
                    					}
                    					
                    	if ($hhh) {				$output .= "<li$class>$itm$desc</li>$ie";}
                    else
                                      {
                            $output .= "<li$class>$itm$desc</li>$ie";}
                    					$class = '';
                    				}
                    			}
                    			$output .= "</ul>$ie";
                    			$output .= ($toplevel) ? (($topdiv) ? "</div>$ie" : "") : (($subdiv) ? "</div>$ie" : "");
                    		}
                    		return $output;
                    	}
                    	$MakeMap_Defined = true;
                    }
                    
                    $currentID = $modx->documentIdentifier;
                    $parentID = $currentID;
                    
                    // find the parent docs of the current "you-are-here" doc
                    // used in the logic to mark parents as such also
                    while ($parentID != $siteMapRoot && $parentID != 0) {
                    	$parent = $modx->getParent($parentID, 0);
                    	if ($parent) {
                    		$parentID = $parent['id'];
                    		$activeLinkIDs[] = $parentID;
                    	} else {
                    		$parentID = 0;
                    	}
                    }
                    
                    if ($phMode) {
                        // output to a [+placeholder+]
                        $modx->setPlaceholder($phName, MakeMap($modx, $siteMapRoot, 0, $showDescription, $titleOfLinks, $maxLevels, false, $pre, $post, $selfAsLink, $ie, $activeLinkIDs, $topdiv, $topdivClass, $topnavClass, $subdiv, $subdivClass, $subnavClass, $hereClass, $useCategoryFolders, $categoryClass, $showDescription, $descriptionField, $textOfLinks, $orderBy, $orderDesc, $debugMode));
                    
                    } else {
                        // return the output a "usual"
                        return MakeMap($modx, $siteMapRoot, 0, $showDescription, $titleOfLinks, $maxLevels, false, $pre, $post, $selfAsLink, $ie, $activeLinkIDs, $topdiv, $topdivClass, $topnavClass, $subdiv, $subdivClass, $subnavClass, $hereClass, $useCategoryFolders, $categoryClass, $showDescription, $descriptionField, $textOfLinks, $orderBy, $orderDesc, $debugMode);
                    
                    }
                    


                    à â øàáëîí, êîòîðûé ñîîòâåòñòâóåò äîêóìåíòàì, ó êîòîðûõ ýòî ìåíþ äîëæíî âûâîäèòñÿ ñëåâà, âñòàâü âûçîâ
                    [[GreyMenu? &MenuName=GreyMenu &startDoc=1 &levelLimit=1 &topdiv=true &topnavClass=topnav]]

                    â äàííîì ñëó÷àå â ìåíþ áóäóò âûâîäèòñÿ ññûëêè íà äî÷åðíèå ýëåìåíòû ê äîêóìåíòó ñ id=1 â ãëóáèíó íà 1 óðîâåíü. Àêòèâíûé ýëåìåíò ìåíþ áóäåò èìåòü ñâîé êëàññ.

                    Ìàøèíêà íóæíà, ÷òîáû óïðîùàòü ñåáå æèçíü. äëÿ öåëîé ãðóïïû äîêóìåíòîâ òû îïðåäåëÿåøü øàáëîí, à â øàáëîíå îïðåäåëÿåøü ìåñòà, êóäà òû áóäåøü âûâîäèòü êîíòåíò è äèíàìè÷åñêèå ýëåìåíòû. Âîò ìåíþ ê äèíàìè÷åñêèì è îòíîñèòñÿ. Âñ¸, ÷òî íóæíî äëÿ ïðîíèêíîâåíèÿ, ýòî ïðîéòèñü ó ñåáÿ æå â àäìèí. ïàíåëå ïî ðàçäåëó ðåñóðñîâ ñ òåìïëåéòàìè, ÷àíêàìè è ñíèïïåòàìè, è, îïÿòü æå, çàãëÿíóòü íà äåìî-ñàéò.

                    Ñäåëàé òåñò. Ñîçäàé øàáëîí, â íåãî âñòàâü âûçîâ ñíèïïåòà ñ ìåíþ. Ïðèâÿæè ñîçäàííûé øàáëîí ê äîêóìåíòàì. Ïîñìîòðè íà ðåçóëüòàò.
                      [img]http://jurist-info.ru/pic/rrr.jpg[/img]

                      Безжалостный пияр!
                      Artima -- неуч!
                      Осторожно: преступная локализация -- modx-cms.ru
                      Баштанник Андрей -- мегапрограммер из Белоруссии и поедатель говна, очень критично настроенный молодой человек!

                      Дисклеймер для общительных: даю сам себе право транслировать в открытый эфир содержание лички, just for fun
                      • 149
                      • 14 Posts
                      Вот спасибо.
                      Теперь я понял как надо было делать ) и что мог избежать предыдущих вопросов.
                      Поначалу не вкурил как работает система шаблонов. оказывается надо было каждому файлу (папке) задать свой нужный шаблон да еще при этом и на "сохранить" нажать ))), чего я в спешке не делал... (

                      А вот по дроп меню есть вопрос:

                      Я в php не силен, но мне нужно сделать так: чтоб первые 2 ссылки шли как один класс, а последующие три, как другой.
                      Дело в том что под меню у меня есть графический бэкграунд. Он порезан на части... ) так вот если последние тём не задать свой класс, то бэкграун выглядит незаконченым ибо низ его остался в другом классе )))

                      Это сложно релализовать? )

                      В принципе на данный момент нашел другое решение ) просто напросто взял и сделал бэкграунд одной картинкой, весит 5,9кб , что думаю не много... тем более что если что когда я её разбивал на две они в сумме давали целых!!! 6,15 кб плюс одна из картинок повторялась ))))

                      Вообщем это уже просто вопрос, т.к. проанализировав всю эту шнягу, что я написал, понял что лучше оставить целиковый бэк и народ не напрягаю да и не сильно скажется это на скорости загрузки ибо размеры не те...

                      openagate
                      У меня к тебе другой вопрос. А как в DropMenu к активному элементу еще и картинку присобачить? )))

                      Еще раз спасибо!!!

                      П.С. Что ты имел ввиду про шаблон? smiley
                      То что я где-то стырил или надобыл бесплатный (платный) шаблон и пытаюсь прифигачить его на MODx?
                      Не ))) я так не делал...
                      Скоро сайт повесится в инет и будет понятно, что да как и к чему все эти вопросы были )