Jump to content

Nem-One

Newbie
  • Posts

    11
  • Joined

  • Last visited

Nem-One's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. так тоже не идет....менял даже 0 в в шем посте на id документа который не хочу видить...все равно он виден.... все разобрался...не тот шаблон редактировал.....простите за отнятое время, и спасибо за помощь!!!!
  2. было 2 параметра дитто...оба установил как говорили..кеш отчистил...все равно товар отображаеться (галка тоже снята) может этот параметр у меня не приписан в системе showInMenuOnly ?
  3. Заменил в шаблоне [!Ditto? &display=`all` &hiddenFields=`item-img` &sortBy=`menuindex` &sortDir=`ASC` &tpl=`catalogue-list`!] на [!Ditto? &display=`all` &hiddenFields=`item-img` &sortBy=`menuindex` &sortDir=`ASC` &tpl=`catalogue-list` &showInMenuOnly=`1`!] галочку показывать в меню убрал...а оно дальше его отображает...
  4. а если таких товаров несколько...то как быть?
  5. может поможете на конкретном примере. вот код шаблона где віводиться каталог: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ua"><head><link rel="alternate" type="application/rss+xml" title="RSS лента" href="http://garmin.lviv.ua/rss" ><meta http-equiv="content-type" content="text/html; charset=[(modx_charset)]" /><title>Garmin в Україні - Garmin Івано-Франківськ. Купити Garmin у Львові. Львів Garmin Україна.Каталог продукції Garmin м.Львів</title><link rel="shortcut icon" href="[(site_url)]favicon.ico"></link> <base href="[(site_url)]" /> <meta http-equiv="content-language" content="ua" /><link rel="stylesheet" type="text/css" href="assets/templates/html/css/style.css" media="screen" /> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="assets/templates/html/css/iefix.css" media="screen" /> <script type="text/javascript" src="assets/templates/html/js/fixpng.js"></script> <![endif]-->[+phx:if=`[*id*]`:is=`6`:then=`<script type="text/javascript" src="assets/templates/html/js/swfobject.js"></script>`+][+phx:if=`[*id*]`:is=`8`:or:is=`12`:then=`<script type="text/javascript" src="assets/templates/html/js/jquery.js"></script><script type="text/javascript" src="assets/templates/html/js/thickbox.js"></script><link rel="stylesheet" type="text/css" href="assets/templates/html/css/thickbox.css" media="screen" />`+]</head><body><div class="conteiner"> <div class="header"> <div> <ul class="index clear"> [+phx:if=`[*id*]`:is=`12`:then=` <li><img src="assets/templates/html/i/index-contacts-grey.gif" alt="Контакти" /></li> `:else=` <li><a href="[~12~]" title="Контакти"><img src="assets/templates/html/i/index-contacts.gif" alt="Контакти" /></a></li> `+] [+phx:if=`[*id*]`:is=`56`:then=` <li><img src="assets/templates/html/i/index-sitemap-grey.gif" alt="Карта сайту" /></li> `:else=` <li><a href="[~56~]" title="Карта сайту"><img src="assets/templates/html/i/index-sitemap.gif" alt="Карта сайту" /></a></li> `+] <li><a href="[~1~]" title="На головну"><img src="assets/templates/html/i/index-home.gif" alt="На головну" /></a></li> </ul> <a class="logo" href="[~1~]" title="На головну"><img src="assets/templates/html/i/logo.gif" alt="Наутіка" /></a> [!Wayfinder? &startId=`0` &level=`1` &outerTpl=`nav-out` &rowTpl=`nav-row` &hereTpl=`nav-current` &hereClass=`current` &lastClass=`last` &excludeDocs=`5,10,38` !] </div> </div> <div class="content clear"> [+phx:if=`[*id*]`:is=`4`:or:is=`11`:then=` <div class="two-of-three"> [!Wayfinder? &startId=`0` &config=`breadcrumb`!] <h1>[*longtitle*]</h1> </div> [*content*] `:else=` [+phx:if=`[*id*]`:is=`5`:or:is=`7`:or:is=`38`:then=` <div class="two-of-three"> [!Wayfinder? &startId=`0` &config=`breadcrumb`!] <h1>[*longtitle*]</h1> </div> [!Ditto? &display=`all` &hiddenFields=`item-img` &sortBy=`date` &sortBy=`edate` &dateSource=`edate` &dateFormat=`%d.%m.%Y` &tpl=`articles-list`!] `:else=` [+phx:if=`[*id*]`:is=`6`:then=` [!Wayfinder? &startId=`6` &level=`1` &outerTpl=`swf-nav-out` &rowTpl=`swf-nav-row` &textOfLinks=`alias` &sortBy=`menuindex` &!] `:else=` [+phx:if=`[*id*]`:is=`12`:then=` <div class="two-of-three"> [!Wayfinder? &startId=`0` &config=`breadcrumb`!] <h1>[*longtitle*]</h1> </div> <div class="two-one"> <div class="two-of-three clear"> <ul class="three-cols contact clear"> [*content*] {{contactFormCall}} </ul> </div> </div> `:else=` [+phx:if=`[*id*]`:eg=`13`:and:el=`21`:then=` [!Wayfinder? &startId=`0` &config=`breadcrumb`!] <ul class="three-cols products clear"> [!Ditto? &display=`all` &hiddenFields=`item-img` &sortBy=`menuindex` &sortDir=`ASC` &tpl=`catalogue-list`!] </ul> `:else=` <div class="two-of-three"> [!Wayfinder? &startId=`0` &config=`breadcrumb`!] <h1>[*longtitle*]</h1> </div> <div class="two-one clear"> <div class="one"> <img src="[*item-img*]" alt="[+pagetitle+]"/> </div> <div class="two"> [+phx:if=`[*parent*]`:is=`21`:then=`<p class="desc">[*introtext*]</p>`:else=``+] [*content*] [+phx:if=`[*id*]`:is=`56`:then=` [!Wayfinder? &startId=`0` &level=`2` &outerTpl=`map-out` &rowTpl=`map-cat` &innerRowTpl=`map-row` &excludeDocs=`1` !] `+] </div> </div> `+]`+]`+]`+]`+] </div> <div class="clearer"> </div> <div class="footer"> <div class="clear"> [!Wayfinder? &startId=`0` &level=`1` &outerTpl=`nav-out` &rowTpl=`nav-row` &lastClass=`last`!] </div> <p>Copyright © 1996—2013 ТзОВ «Компанія Наутіка» м. Львів, тел.: +38 (032) 295-72-96</p> | <a href="[~57~]" title="Права користування">Права користування</a> | <a href="[~56~]" title="Карта сайту">Карта сайту</a> </div> </div><script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">try {var pageTracker = _gat._getTracker("UA-2803484-2");pageTracker._trackPageview();} catch(err) {}</script></body></html>вот код параметра Dito <?php/* * Title: Ditto Snippet * * Description: * Aggregates documents to create blogs, article/news * collections, and more,with full support for templating. * * Author: * Mark Kaplan for MODx CMF * * Version: * 2.0.2*///---Core Settings---------------------------------------------------- //$ditto_version = "2.0.2"; // Ditto version being executed$ditto_base = isset($ditto_base) ? $modx->config['base_path'].$ditto_base : $modx->config['base_path']."assets/snippets/ditto/";/* Param: ditto_base Purpose: Location of Ditto files Options: Any valid folder location containing the Ditto source code with a trailing slash Default: [(base_path)]assets/snippets/ditto/*/$dittoID = (!isset($id)) ? "" : $id."_";$GLOBALS["dittoID"] = $dittoID;/* Param: id Purpose: Unique ID for this Ditto instance for connection with other scripts (like Reflect) and unique URL parameters Options: Any combination of characters a-z, underscores, and numbers 0-9 Note: This is case sensitive Default: "" - blank*/ $language = (isset($language))? $language : "english";/* Param: language Purpose: language for defaults, debug, and error messages Options: Any language name with a corresponding file in the &ditto_base/lang folder Default: "english"*/$format = (isset($format)) ? strtolower($format) : "html" ;/* Param: format Purpose: Output format to use Options: - "html" - "json" - "xml" - "atom" - "rss" Default: "html"*/$config = (isset($config)) ? $config : "default";/* Param: config Purpose: Load a custom configuration Options: "default" - default blank config file CONFIG_NAME - Other configs installed in the configs folder or in any folder within the MODx base path via @FILE Default: "default" Related: - <extenders>*/$debug = isset($debug)? $debug : 0;/* Param: debug Purpose: Output debugging information Options: 0 - off 1 - on Default: 0 - off Related: - <debug>*/$phx = (isset($phx))? $phx : 1;/* Param: phx Purpose: Use PHx formatting Options: 0 - off 1 - on Default: 1 - on*/ $extenders = isset($extenders) ? explode(",",$extenders) : array();/* Param: extenders Purpose: Load an extender which adds functionality to Ditto Options: Any extender in the extenders folder or in any folder within the MODx base path via @FILE Default: [NULL] Related: - <config>*/ // Variable: extenders // Array that can be added to by configs or formats to load that extender $placeholders = array(); // Variable: placeholders // Initialize custom placeholders array for configs or extenders to add to$filters = array("custom"=>array(),"parsed"=>array()); // Variable: filters // Holds both the custom filters array for configs or extenders to add to // and the parsed filters array. To add to this array, use the following format // (code) // $filters["parsed"][] = array("name" => array("source"=>$source,"value"=>$value,"mode"=>$mode)); // $filters["custom"][] = array("source","callback_function"); //---Includes-------------------------------------------------------- //$files = array ( "language" => $ditto_base."lang/$language.inc.php", "main_class" => $ditto_base."classes/ditto.class.inc.php", "template_class" => $ditto_base."classes/template.class.inc.php", "filter_class" => $ditto_base."classes/filter.class.inc.php", "format" => $ditto_base."formats/$format.format.inc.php", "config" => (substr($config, 0, 5) != "@FILE") ? $ditto_base."configs/$config.config.php" : $modx->config['base_path'].trim(substr($config, 5)));if ($phx == 1) { $files["prePHx_class"] = $ditto_base."classes/phx.pre.class.inc.php";}if (isset($randomize)) { $files["randomize_class"] = $ditto_base."classes/random.class.inc.php";}if ($debug == 1) { $files["modx_debug_class"] = $ditto_base."debug/modxDebugConsole.class.php"; $files["debug_class"] = $ditto_base."classes/debug.class.inc.php"; $files["debug_templates"] = $ditto_base."debug/debug.templates.php";}foreach ($files as $filename => $filevalue) { if (file_exists($filevalue) && strpos($filename,"class")) { include_once($filevalue); } else if (file_exists($filevalue)) { include($filevalue); } else if ($filename == "language") { $modx->logEvent(1, 3, "Language file does not exist Please check: " . $filevalue, "Ditto " . $ditto_version); return "Language file does not exist Please check: " . $filevalue; } else { $modx->logEvent(1, 3, $filevalue . " " . $_lang['file_does_not_exist'], "Ditto " . $ditto_version); return $filevalue . " " . $_lang['file_does_not_exist']; }}//---Initiate Class-------------------------------------------------- //if (class_exists('ditto')) { $ditto = new ditto($dittoID,$format,$_lang,$dbg_templates); // create a new Ditto instance in the specified format and language with the requested debug level} else { $modx->logEvent(1,3,$_lang['invalid_class'],"Ditto ".$ditto_version); return $_lang['invalid_class'];}//---Initiate Extenders---------------------------------------------- //if (isset($tagData)) { $extenders[] = "tagging";}if(count($extenders) > 0) { $extenders = array_unique($extenders); foreach ($extenders as $extender) { if(substr($extender, 0, 5) != "@FILE") { $extender_path = $ditto_base."extenders/".$extender.".extender.inc.php"; } else { $extender_path = $modx->config['base_path'].trim(substr($extender, 5)); } if (file_exists($extender_path)){ include($extender_path); } else { $modx->logEvent(1, 3, $extender . " " . $_lang['extender_does_not_exist'], "Ditto ".$ditto_version); return $extender . " " . $_lang['extender_does_not_exist']; } } }//---Parameters------------------------------------------------------- /*if (isset($startID)) {$parents = $startID;}if (isset($summarize)) {$display = $summarize;}if (isset($limit)) {$queryLimit = $limit;} // Allow backwards compatibility$idType = isset($documents) ? "documents" : "parents"; // Variable: idType // type of IDs provided; can be either parents or documents$parents = isset($parents) ? $ditto->cleanIDs($parents) : $modx->documentIdentifier;/* Param: parents Purpose: IDs of containers for Ditto to retrieve their children to &depth depth Options: Any valid MODx document marked as a container Default: Current MODx Document Related: - <documents> - <depth>*/$documents = isset($documents) ? $ditto->cleanIDs($documents) : false;/* Param: documents Purpose: IDs of documents for Ditto to retrieve Options: Any valid MODx document marked as a container Default: None Related: - <parents>*/$IDs = ($idType == "parents") ? $parents : $documents; // Variable: IDs // Internal variable which holds the set of IDs for Ditto to fetch$depth = isset($depth) ? $depth : 1;/* Param: depth Purpose: Number of levels deep to retrieve documents Options: Any number greater than or equal to 1 Default: 1 Related: - <seeThruUnpub>*/$paginate = isset($paginate)? $paginate : 0;/* Param: paginate Purpose: Paginate the results set into pages of &show lenght Options: 0 - off 1 - on Default: 0 - off Related: - <paginateAlwaysShowLinks> - <paginateSplitterCharacter> - <show>*/$dateSource = isset($dateSource) ? $dateSource : "createdon";/* Param: dateSource Purpose: Source of the [+date+] placeholder Options: # - Any UNIX timestamp from MODx fields or TVs such as createdon, pub_date, or editedon Default: "createdon" Related: - <dateFormat>*/$dateFormat = isset($dateFormat)? $dateFormat : $_lang["dateFormat"];/* Param: dateFormat Purpose: Format the [+date+] placeholder in human readable form Options: Any PHP valid strftime option Default: [LANG] Related: - <dateSource>*/$display = isset($display) ? $display : 3;/* Param: display Purpose: Number of documents to display in the results Options: # - Any number "all" - All documents found Default: 3 Related: - <queryLimit> - <total>*/$total = isset($total) ? $total : "all";/* Param: total Purpose: Number of documents to retrieve Options: # - Any number "all" - All documents found Default: "all" - All documents found Related: - <show> - <queryLimit>*/$showPublishedOnly = isset($showPublishedOnly) ? $showPublishedOnly : 1;/* Param: showPublishedOnly Purpose: Show only published documents Options: 0 - show only unpublished documents 1 - show only published documents Default: 1 - show only published documents Related: - <seeThruUnpub> - <hideFolders> - <showPublishedOnly> - <where> Todo: - Allow when set to 0 show both published and unpublished documents*/$showInMenuOnly = isset($showInMenuOnly) ? $showInMenuOnly : 0;/* Param: showInMenuOnly Purpose: Show only documents visible in the menu Options: 0 - show all documents 1 - show only documents with the show in menu flag checked Default: 0 - show all documents Related: - <seeThruUnpub> - <hideFolders> - <where>*/$hideFolders = isset($hideFolders)? $hideFolders : 0;/* Param: hideFolders Purpose: Don't show folders in the returned results Options: 0 - keep folders 1 - remove folders Default: 0 - keep folders Related: - <seeThruUnpub> - <showInMenuOnly> - <where>*/$seeThruUnpub = (isset($seeThruUnpub))? $seeThruUnpub : 1 ;/* Param: seeThruUnpub Purpose: See through unpublished folders to retrive their children Used when depth is greater than 1 Options: 0 - off 1 - on Default: 0 - off Related: - <hideFolders> - <showInMenuOnly> - <where>*/$queryLimit = (isset($queryLimit))? $queryLimit : 0;/* Param: queryLimit Purpose: Number of documents to retrieve from the database, same as MySQL LIMIT Options: # - Any number 0 - automatic Default: 0 - automatic Related: - <where>*/$where = (isset($where))? $where : "";/* Param: where Purpose: Custom MySQL WHERE statement Options: A valid MySQL WHERE statement using only document object items (no TVs) Default: [NULL] Related: - <queryLimit>*/$noResults = isset($noResults)? $ditto->getParam($noResults,"no_documents") : $_lang['no_documents'];/* Param: noResults Purpose: Text or chunk to display when there are no results Options: Any valid chunk name or text Default: [LANG]*/$removeChunk = isset($removeChunk) ? explode(",",$removeChunk) : false;/* Param: removeChunk Purpose: Name of chunks to be stripped from content separated by commas - Commonly used to remove comments Options: Any valid chunkname that appears in the output Default: [NULL]*/$hiddenFields = isset($hiddenFields) ? explode(",",$hiddenFields) : false;/* Param: hiddenFields Purpose: Allow Ditto to retrieve fields its template parser cannot handle such as nested placeholders and [*fields*] Options: Any valid MODx fieldnames or TVs comma separated Default: [NULL]*/$sortDir = isset($sortDir) ? strtoupper($sortDir) : 'DESC';/* Param: sortDir Purpose: Direction to sort documents Options: ASC - ascending DESC - descending Default: "DESC" Related: - <sortBy>*/$sortBy = isset($sortBy) ? $ditto->parseSort($sortBy, $randomize) : "createdon";/* Param: sortBy Purpose: Field to sort documents by Options: Any document object field or TV Default: "createdon" Related: - <sortDir>*/$offset = isset($start) ? $start : 0;$start = (isset($_GET[$dittoID.'start'])) ? intval($_GET[$dittoID.'start']) : 0;/* Param: start Purpose: Number of documents to skip in the results Options: Any number Default: 0*/$globalFilterDelimiter = isset($globalFilterDelimiter) ? $globalFilterDelimiter : "|";/* Param: globalFilterDelimiter Purpose: Filter delimiter used to separate filters in the filter string Options: Any character not used in the filters Default: "|" Related: - <localFilterDelimiter> - <filter> - <parseFilters>*/ $localFilterDelimiter = isset($localFilterDelimiter) ? $localFilterDelimiter : ",";/* Param: localFilterDelimiter Purpose: Delimiter used to separate individual parameters within each filter string Options: Any character not used in the filter itself Default: "," Related: - <globalFilterDelimiter> - <filter> - <parseFilters>*/$filters["custom"] = isset($cFilters) ? array_merge($filters["custom"],$cFilters) : $filters["custom"];$filters["parsed"] = isset($parsedFilters) ? array_merge($filters["parsed"],$parsedFilters) : $filters["parsed"]; // handle 2.0.0 compatibility$filter = (isset($filter) || ($filters["custom"] != false) || ($filters["parsed"] != false)) ? $ditto->parseFilters($filter,$filters["custom"],$filters["parsed"],$globalFilterDelimiter,$localFilterDelimiter) : false;/* Param: filter Purpose: Only show items meeting a criteria Use in the format field,criteria,mode with the comma being the local delimiter *Mode* *Meaning* 1 - != 2 - == 3 - < 4 - > 5 - <= 6 - >= 7 - Text not in field value 8 - Text in field value @EVAL: @EVAL in filters works the same as it does in MODx exect it can only be used with basic filtering, not custom filtering (tagging, etc). Make sure that you return the value you wish Ditto to filter by and that the code is valid PHP. Default: [NULL] Related: - <localFilterDelimiter> - <globalFilterDelimiter> - <parseFilters>*/$keywords = (isset($keywords))? $keywords : 0;/* Param: keywords Purpose: Enable fetching of associated keywords for each document Can be used as [+keywords+] or as a tagData source Options: 0 - off 1 - on Default: 0 - off*/$randomize = (isset($randomize))? $randomize : 0;/* Param: randomize Purpose: Randomize the order of the output Options: 0 - off 1 - on Any MODx field or TV for weighted random Default: 0 - off*/$save = (isset($save))? $save : 0;/* Param: save Purpose: Saves the ditto object and results set to placeholders for use by other snippets Options: 0 - off; returns output 1 - remaining; returns output 2 - all; 3 - all; returns ph only Default: 0 - off; returns output*/$templates = array( "default" => "@CODE".$_lang['default_template'], "base" => $tpl, "alt" => $tplAlt, "first" => $tplFirst, "last" => $tplLast, "current" => $tplCurrentDocument);/* Param: tpl Purpose: User defined chunk to format the documents Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: [LANG]*//* Param: tplAlt Purpose: User defined chunk to format every other document Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: &tpl*//* Param: tplFirst Purpose: User defined chunk to format the first document Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: &tpl*//* Param: tplLast Purpose: User defined chunk to format the last document Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: &tpl*//* Param: tplCurrentDocument Purpose: User defined chunk to format the current document Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: &tpl*///-------------------------------------------------------------------- */ $templates = $ditto->template->process($templates); // parse the templates for TV's and store them for later use$ditto->setDisplayFields($ditto->template->fields,$hiddenFields); // parse hidden fields $ditto->parseFields($placeholders,$seeThruUnpub,$dateSource,$randomize); // parse the fields into the field array $documentIDs = $ditto->determineIDs($IDs, $idType, $ditto->fields["backend"]["tv"], $sortBy, $sortDir, $depth, $showPublishedOnly, $seeThruUnpub, $hideFolders, $showInMenuOnly, $where, $keywords, $queryLimit, $display, $filter,$paginate, $randomize); // retrieves a list of document IDs that meet the criteria and populates the $resources array with them$count = count($documentIDs); // count the number of documents to be retrieved$count = $count-$offset; // handle the offsetif ($count > 0) { // if documents are returned continue with execution $total = ($total == "all") ? $count : min($total,$count); // set total equal to count if all documents are to be included $display = ($display == "all") ? min($count,$total) : min($display,$total); // allow show to use all option $stop = ($save != "1") ? min($total-$start,$display) : min($count,$total); // set initial stop count if($paginate == 1) { $paginateAlwaysShowLinks = isset($paginateAlwaysShowLinks)? $paginateAlwaysShowLinks : 0; /* Param: paginateAlwaysShowLinks Purpose: Determine whether or not to always show previous next links Options: 0 - off 1 - on Default: 0 - off Related: - <paginate> - <paginateSplitterCharacter> */ $paginateSplitterCharacter = isset($paginateSplitterCharacter)? $paginateSplitterCharacter : $_lang['button_splitter']; /* Param: paginateSplitterCharacter Purpose: Splitter to use if always show is disabled Options: Any valid character Default: [LANG] Related: - <paginate> - <paginateSplitterCharacter> */ $tplPaginatePrevious = isset($tplPaginatePrevious)? $ditto->template->fetch($tplPaginatePrevious) : $_lang['prev']; /* Param: tplPaginatePrevious Purpose: Template for the inside of the previous link Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: [LANG] Related: - <tplPaginateNext> - <paginateSplitterCharacter> */ $tplPaginateNext = isset($tplPaginateNext)? $ditto->template->fetch($tplPaginateNext) : $_lang['next']; /* Param: tplPaginateNext Purpose: Template for the inside of the next link Options: - Any valid chunk name - Code via @CODE - File via @FILE Default: [LANG] Related: - <tplPaginatePrevious> - <paginateSplitterCharacter> */ $ditto->paginate($start, $stop, $total, $display, $tplPaginateNext, $tplPaginatePrevious, $paginateAlwaysShowLinks, $paginateSplitterCharacter); // generate the pagination placeholders } $dbFields = $ditto->fields["display"]["db"]; // get the database fields $TVs = $ditto->fields["display"]["tv"]; // get the TVs switch($sortDir) { case "DESC": $stop = ($ditto->prefetch === false) ? $stop + $start + $offset : $stop + $offset; $start += $offset; break; case "ASC": $start += $offset; $stop += $start; break; } if ($ditto->prefetch !== false) { $documentIDs = array_slice($documentIDs,$start,$stop); // set the document IDs equal to the trimmed array $dbFields = array_diff($dbFields,$ditto->prefetch["fields"]["db"]); // calculate the difference between the database fields and those already prefetched $dbFields[] = "id"; // append id to the db fields array $TVs = array_diff($TVs,$ditto->prefetch["fields"]["tv"]); // calculate the difference between the tv fields and those already prefetched $start = 0; $stop = min($display,count($documentIDs)); } else { $queryLimit = ($queryLimit == 0) ? "" : $queryLimit; } $resource = $ditto->getDocuments($documentIDs, $dbFields, $TVs, $keywords, $showPublishedOnly, 0, $where, $queryLimit, $sortBy, $sortDir,$randomize); // retrieves documents $output = $header; // initialize the output variable and send the header if ($resource) { if ($randomize != "0" && $randomize != "1") { $resource = $ditto->weightedRandom($resource,$randomize,$stop); // randomize the documents } $resource = array_values($resource); for ($x=$start;$x<$stop;$x++) { $template = $ditto->template->determine($templates,$x,0,$stop,$resource[$x]["id"]); // choose the template to use and set the code of that template to the template variable $renderedOutput = $ditto->render($resource[$x], $template, $removeChunk, $dateSource, $dateFormat, $placeholders,$phx); // render the output using the correct template, in the correct format and language $modx->setPlaceholder($dittoID."item[".abs($start-$x)."]",$renderedOutput); /* Placeholder: item[x] Content: Individual items rendered output */ $output .= $renderedOutput; // send the rendered output to the buffer } } else { $output .= $noResults; // if no documents are found return a no documents found string } $output .= $footer; // send the footer // --------------------------------------------------- // Save Object // --------------------------------------------------- if($save) { $modx->setPlaceholder($dittoID."ditto_object", $ditto); $modx->setPlaceholder($dittoID."ditto_resource", ($save == "1") ? array_slice($resource,$display) : $resource); }} else { $output = $header.$noResults.$footer;}// ---------------------------------------------------// Handle Debugging// ---------------------------------------------------if ($debug == 1) { $ditto_params = func_get_args(); if (!isset($_GET["ditto_".$dittoID."debug"])) { $_SESSION["ditto_debug_$dittoID"] = $ditto->debug->render_popup($ditto, $ditto_base, $ditto_version, $ditto_params[1], $documentIDs, array("db"=>$dbFields,"tv"=>$TVs), $display, $templates, $sortBy, $sortDir, $start, $stop, $total,$filter,$resource); } if (isset($_GET["ditto_".$dittoID."debug"])) { switch ($_GET["ditto_".$dittoID."debug"]) { case "open" : exit($_SESSION["ditto_debug_$dittoID"]); break; case "save" : $ditto->debug->save($_SESSION["ditto_debug_$dittoID"],"ditto".strtolower($ditto_version)."_debug_doc".$modx->documentIdentifier.".html"); break; } } else { $output = $ditto->debug->render_link($dittoID,$ditto_base).$output; }}return ($save != 3) ? $output : "";?>Что где, убрать или дописать?
  6. чесно,я наверно далеко не проф. почти ничего не понял...
  7. та как бы снимаю галку показывать в меню...в админке документ стаёт светло серый (как бы не активен)..а в каталоге все равно присутствует...
  8. версия 0.9.6.1 никаких модулей не использую..все шаблоном ( говорю ж єто не интрнет магазин а просто каталог) вы верно поняли..Публикация должна быть активна, но не отображаться, а ссылка на эту станичку с другового или своего же ресурса вела к этому товару.
  9. Доброго времени суток. Прошу консультации. Имееться сайт на modx. Там присутствует каталог с товаром (не интернет магазин). Есть устаревший товар, который надо убрать с сайта, но если просто снясть публикацию то ссылочная масса повредиться, тоесть даже внутрение ссылки на те товары будут не действительны. Как бы сделать так, что б в каталоге публикация не отображалась, а по ссылке дальше была активна. p.s. задал вопрос как можно понятнее.
  10. Вопрос всё ещё актуален, так как решение никто не подсказал..Жду вашей помощи))
  11. Уважаемые форумчане. Помогите с проблемкой. Реализовал на сайте с Joomla модуль JUNewsUltra Pro (для вывода блока с случайными статьями). Также на главной странице реализован модуль последние новости. Проблема в том, что не могу правильно подобрать позицию с правильными параметрами для JUNewsUltra Pro. Вот код html шаблона: <?php /** * @package Joomla.Site * @subpackage Templates.beez5 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access. defined('_JEXEC') or die; JHtml::_('behavior.framework', true); // get params $color = $this->params->get('templatecolor'); $logo = $this->params->get('logo'); $navposition = $this->params->get('navposition'); $app = JFactory::getApplication(); $doc = JFactory::getDocument(); $templateparams = $app->getTemplate(true)->params; $Itemid = JRequest::getInt( 'Itemid', 1, 'get' ); ?> <?php if(!$templateparams->get('html5', 0)): ?> <?php $req_patch = $_SERVER['REQUEST_URI']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php else: ?> <?php echo '<!DOCTYPE html>'; ?> <?php endif; ?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" > <head> <jdoc:include type="head" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/garage/css/style.css" type="text/css" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-37612377-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <? $myabsoluteurl=JURI::current(); //var_dump($myabsoluteurl); ?> <?php if($myabsoluteurl == 'http://g23.lviv.ua/ua/' || $myabsoluteurl == 'http://g23.lviv.ua/' || $myabsoluteurl == 'http://g23.lviv.ua/ua' || $myabsoluteurl == 'http://g23.lviv.ua/ru' || $myabsoluteurl == 'http://g23.lviv.ua/ru/' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=0' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=1' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=2' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=3' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=4' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=5' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=6' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=7' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=8' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=9' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=10' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=11' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=12' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=13' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=14' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=15' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=16' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=17' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=18' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu?start=19' || $myabsoluteurl == 'http://g23.lviv.ua/ua/novunu' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=0' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=1' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=2' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=3' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=4' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=5' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=6' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=7' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=8' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=9' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=10' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=11' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=12' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=13' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=14' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=15' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=16' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=17' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=18' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu?start=19' || $myabsoluteurl == 'http://g23.lviv.ua/ru/novunu'){ ?> <style type="text/css"> .img-intro-left{ display: none !important; } </style> <?php //die(); ?> <?php } ?> <a href="https://plus.google.com/109816277659713075446" rel="publisher"></a> </head> <body> <div class="head"> <div class="header"> <div class="logo"><a href=""><img src="<?php echo $this->baseurl ?>/templates/garage/images/logo.png" /></a></div> <div class="slogan"> <? if ($this->language =='uk-ua') {?> <img src="<?php echo $this->baseurl ?>/templates/garage/images/slogan.png" /> <? } else {?> <img src="<?php echo $this->baseurl ?>/templates/garage/images/slogan_ru.png" /> <?}?> </div> <div class="topmenu"> <jdoc:include type="modules" name="topmenu" /> </div> <div class="lang"> <jdoc:include type="modules" name="lang" /> </div> </div> </div> <div class="main"> <div class="mainer"> <div class="l"> <img src="<?php echo $this->baseurl ?>/templates/garage/images/menutop.png" /> <jdoc:include type="modules" name="leftmenu" /><img src="<?php echo $this->baseurl ?>/templates/garage/images/menubott.png" /> </div> <div class="r"> <? if ($Itemid==101) {?> <jdoc:include type="modules" name="slider" /> <div style="clear:both"> </div> <div class="im<?php echo $this->language; ?>"> <div style="float:left;margin-top:5px;margin-left:5px;text-align:center;"> <a href="zakhyst-avto-antyhraviinoiu-plivkoiu"><img src="<?php echo $this->baseurl ?>/templates/garage/images/transp.gif" /></a> <div style="height:5px;"> </div> <a href="zakhyst-avto-antyhraviinoiu-plivkoiu"</a></div> <div style="float:left;margin-top:5px;margin-left:35px;text-align:center;"> <a href="avtoakustyka"><img src="<?php echo $this->baseurl ?>/templates/garage/images/transp.gif" /></a> <div style="height:5px;"> </div> <a href="avtoakustyka"</a></div> <div style="float:left;margin-top:5px;margin-left:34px;text-align:center;"> <a href="adaptatsiia-amerykanskykh-avto"><img src="<?php echo $this->baseurl ?>/templates/garage/images/transp.gif" /></a> <div style="height:5px;"> </div> </div> </div> <?} else {?> <jdoc:include type="component" /> <?}?> </div> <div style="clear:both"></div> <div class="l"> <jdoc:include type="modules" name="junews" /> </div> <? $myabsoluteurl=JURI::current(); //var_dump($myabsoluteurl); ?> <?php if( $myabsoluteurl == 'http://g23.lviv.ua/ua/' || $myabsoluteurl == 'http://g23.lviv.ua/' || $myabsoluteurl == 'http://g23.lviv.ua/ua' || $myabsoluteurl == 'http://g23.lviv.ua/ru' || $myabsoluteurl == 'http://g23.lviv.ua/ru/' ){ ?> <style type="text/css"> .moduletable{ width: 655px; margin-left: 310px; } .moduletable h3{ padding-bottom: 10px; } </style> <jdoc:include type="modules" name="atomic-bottommiddle" style="xhtml" /> <?php }else{ ?> <!-- no news loaded --> <?php } ?> <div style="clear:both"> </div> <div class="footer"> <div class="foot1"><br /> <a href="http://vk.com/garage23"><img alt="" src="http://g23.lviv.ua/images/vkontakte.png" /></a> <a href="http://www.facebook.com/g23.lviv.ua"><img alt="" src="http://g23.lviv.ua/images/facebook.png" /></a><a href="http://www.odnoklassniki.ru/group/51887114813615"><img alt="" src="http://g23.lviv.ua/images/odnoklassniki.png" /> <a href="http://www.youtube.com/user/Garage23Lviv"><img alt="" src="http://g23.lviv.ua/images/youtube.png" /></a> </div> <div class="foot2"> <?php echo JText::_('TPL_FOOT2'); ?> </div> <div class="foot3"> <?php echo JText::_('TPL_PHONE'); ?> <br /> +3 8 (067) 341-03-43<br /> +3 8 (067) 340-26-13<br /> +3 8 (032) 244-42-34 </div> <div class="foot5"><a href="http://goldweb.com.ua/" target="_blank"><img src="<?php echo $this->baseurl ?>/templates/garage/images/logo_goldweb.png" /></a></div> </div> </div> </div> </body> </html> Модуль в коде это: <div class="l"> <jdoc:include type="modules" name="junews" /> </div> При такой позиции, на главной странице всё хорошо, но если я устанавливаю отображения модуля на каких либо страницах с контентом то параметр <div style="clear:both"></div> который над ним опускает его после контента, как на скринах. Пробовал убирать <div style="clear:both"></div> , на страницах с контентом, тогда всё хорошо, но на главной странице, там где подключен модуль Последние новости, заголовок модуля уезжает вверх под баннеры. Очень прошу помощи, уже который день бьюсь безрезультатно. Сайт главная страница: g23.lviv.ua Страница с контентом: g23.lviv.ua/ua/novunu (наглядно показано куда уезжают блоки)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy