Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: MODx problem z menu[Wayfinder]
Forum PHP.pl > Forum > Gotowe rozwiązania > Systemy portalowe i CMS'y
nowyyy31
Witam

mam mały problem z systemem CMS MODx, nie wiem jak przypisać klasy/class...

chce żeby tak menu moje wyglądało
Kod
<ul id="menuul">
<li class="none"><a href="/link">Główna</a></li>
<li class="none"><a href="/link">Kontakt</a></li>
</ul>


a jak narazie wygląda tak
Kod
<ul>
<li><a href="/link">Główna</a></li>
<li ><a href="/link">Kontakt</a></li>
</ul>

jak to zmienić??

konfiguracja Wayfinder
Kod
<?php
/*
::::::::::::::::::::::::::::::::::::::::
Snippet name: Wayfinder
Short Desc: builds site navigation
Version: 2.0
Authors:
    Kyle Jaebker (muddydogpaws.com)
    Ryan Thrash (vertexworks.com)
Date: February 27, 2006
::::::::::::::::::::::::::::::::::::::::
Description:
    Totally refactored from original DropMenu nav builder to make it easier to
    create custom navigation by using chunks as output templates. By using templates,
    many of the paramaters are no longer needed for flexible output including tables,
    unordered- or ordered-lists (ULs or OLs), definition lists (DLs) or in any other
    format you desire.
::::::::::::::::::::::::::::::::::::::::
Example Usage:
    [[Wayfinder? &startId=`0`]]
::::::::::::::::::::::::::::::::::::::::
*/

$wayfinder_base = $modx->config['base_path']."assets/snippets/wayfinder/";

//Include a custom config file if specified
$config = (isset($config)) ? "{$wayfinder_base}configs/{$config}.config.php" : "{$wayfinder_base}configs/default.config.php";
if (file_exists($config)) {
    include_once("$config");
}

include_once("{$wayfinder_base}wayfinder.inc.php");

if (class_exists('Wayfinder')) {
   $wf = new Wayfinder();
} else {
    return 'error: Wayfinder class not found';
}

$wf->_config = array(
    'id' => isset($startId) ? $startId : $modx->documentIdentifier,
    'level' => isset($level) ? $level : 0,
    'includeDocs' => isset($includeDocs) ? $includeDocs : 0,
    'excludeDocs' => isset($excludeDocs) ? $excludeDocs : 0,
    'ph' => isset($ph) ? $ph : FALSE,
    'debug' => isset($debug) ? TRUE : FALSE,
    'ignoreHidden' => isset($ignoreHidden) ? $ignoreHidden : TRUE,
    'hideSubMenus' => isset($hideSubMenus) ? $hideSubMenus : FALSE,
    'useWeblinkUrl' => isset($useWeblinkUrl) ? $useWeblinkUrl : TRUE,
    'fullLink' => isset($fullLink) ? $fullLink : FALSE,
    'nl' => isset($removeNewLines) ? '' : "\n",
    'sortOrder' => isset($sortOrder) ? strtoupper($sortOrder) : 'ASC',
    'sortBy' => isset($sortBy) ? $sortBy : 'menuindex',
    'limit' => isset($limit) ? $limit : 0,
    'cssTpl' => isset($cssTpl) ? $cssTpl : TRUE,
    'jsTpl' => isset($jsTpl) ? $jsTpl : FALSE,
    'rowIdPrefix' => isset($rowIdPrefix) ? $rowIdPrefix : FALSE,
    'textOfLinks' => isset($textOfLinks) ? $textOfLinks : 'menutitle',
    'titleOfLinks' => isset($titleOfLinks) ? $titleOfLinks : 'pagetitle',
    'displayStart' => isset($displayStart) ? $displayStart : FALSE,
);

//get user class definitions
$wf->_css = array(
    'first' => isset($firstClass) ? $firstClass : '',
    'last' => isset($lastClass) ? $lastClass : 'last',
    'here' => isset($hereClass) ? $hereClass : '',
    'parent' => isset($parentClass) ? $parentClass : '',
    'row' => isset($rowClass) ? $rowClass : '',
    'outer' => isset($outerClass) ? $outerClass : '',
    'inner' => isset($innerClass) ? $innerClass : '',
    'level' => isset($levelClass) ? $levelClass: '',
    'self' => isset($selfClass) ? $selfClass : '',
    'weblink' => isset($webLinkClass) ? $webLinkClass : '',
);

//get user templates
$wf->_templates = array(
    'outerTpl' => isset($outerTpl) ? $outerTpl : '',
    'rowTpl' => isset($rowTpl) ? $rowTpl : '',
    'parentRowTpl' => isset($parentRowTpl) ? $parentRowTpl : '',
    'parentRowHereTpl' => isset($parentRowHereTpl) ? $parentRowHereTpl : '',
    'hereTpl' => isset($hereTpl) ? $hereTpl : '',
    'innerTpl' => isset($innerTpl) ? $innerTpl : '',
    'innerRowTpl' => isset($innerRowTpl) ? $innerRowTpl : '',
    'innerHereTpl' => isset($innerHereTpl) ? $innerHereTpl : '',
    'activeParentRowTpl' => isset($activeParentRowTpl) ? $activeParentRowTpl : '',
    'categoryFoldersTpl' => isset($categoryFoldersTpl) ? $categoryFoldersTpl : '',
    'startItemTpl' => isset($startItemTpl) ? $startItemTpl : '',
);

//Process Wayfinder
$output = $wf->run();

if ($wf->_config['debug']) {
    $output .= $wf->renderDebugOutput();
}

//Ouput Results
if ($wf->_config['ph']) {
    $modx->setPlaceholder($wf->_config['ph'],$output);
} else {
    return $output;
}
?>


proszę o pomoc...
DeXTeD
Musisz stworzyć nowe szablony (chunks) do menu, tutaj masz opisane:

http://wiki.modxcms.com/index.php/Wayfinde...late_Parameters
nowyyy31
tylko że jest mały problem bo nie znam na tyle angielskiego żeby sobie poradzić z angielskich poradników ;/

dlatego się pytałem tutaj na forum... bo myślałem ze dostanę odpowiedź po polsku... winksmiley.jpg
DeXTeD
Na tyle to nie znam się na tym CMS, ale zawsze można tak:

http://url.ie/24bp


// Pomógł++
// ayeo
nowyyy31
dodałem 2 chunks
  1. <?php
  2. <li class="none"><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>[+wf.wrapper+]</li>[php]
  3.  
  4. [php]<ul id= "menuul"[+wf.classes+]>[+wf.wrapper+]</ul>
  5. ?>


i jest git... dzieki... winksmiley.jpg
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.