MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Dec 04, 2008, 12:20 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Donate to MODx:
Donations
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Navigation & Tagging/Taxonomy
»
Wayfinder & DropMenu
(Moderators:
zi
,
kylej
,
PaulGregory
)
»
DropMenu. if SelfAsLink = false
Pages: [
1
]
2
Go Down
« Previous topic
Next topic »
Print
Author
Topic: DropMenu. if SelfAsLink = false (Read 5274 times)
0 Members and 1 Guest are viewing this topic.
openagate
Committed to MODx
Posts: 770
DropMenu. if SelfAsLink = false
«
on:
Dec 21, 2005, 07:58 PM »
Any element of menu, if current page, -- isn't a link. SelfAsLink no more:)
Correct snatch of code by just add
$itm .= ((!$selfAsLink && ($child['id'] == $modx->documentIdentifier)) || ($itsEmpty && $useCategoryFolders)) ?
for
elseif ($isFolder && $inside)
:
Code:
/////////////////////////////// If at the top level
if (!$inside)
{
$itm .= ((!$selfAsLink && ($child['id'] == $modx->documentIdentifier)) || ($itsEmpty && $useCategoryFolders)) ?
$pre.$child[$textOfLinks].$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 . (($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)) ? $child[$textOfLinks] : '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$child[$textOfLinks].'</a>';
$itm .= ($debugMode) ? ' doc' : '';
}
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
rthrash
Foundation
Posts: 9,577
Re: DropMenu. if SelfAsLink = false
«
Reply #1 on:
Dec 22, 2005, 01:12 AM »
What is not happening that you expect to happen?
Logged
MODx
is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you
help us help you
,
read the wiki
, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @
Collabpad
work
productively.
work
intelligently.
work
together.
MODx
Current
|
Dev
|
SVN Root
|
JIRA (Bugs)
|
Confluence (097 Wiki)
|
Fisheye SVN Browser
openagate
Committed to MODx
Posts: 770
Re: DropMenu. if SelfAsLink = false
«
Reply #2 on:
Dec 22, 2005, 07:30 AM »
So...
The site has some levels, for example:
--Level 1(start)
---------Level 11(end)
---------Level 12
----------------Level 121(end)
----------------Level 122
-----------------------Level 1221(end)
-----------------------Level 1222(end)
-----------------------Level 1223(end)
----------------Level 123(end)
---------Level 13(end)
& SelfAsLink = false
it would be desirable, that when we are at the Level 12
or at the Level 122, an active element of the menu would not be a link.
At the start or end Level -- all right -- SelfNotAsLink.
I hope, that I state clearly . English - not my native language.
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
rthrash
Foundation
Posts: 9,577
Re: DropMenu. if SelfAsLink = false
«
Reply #3 on:
Dec 22, 2005, 08:12 AM »
The way the self as link should function in my mind is to turn off only for the page you're on. Was it not doing that properly?
Logged
MODx
is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you
help us help you
,
read the wiki
, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @
Collabpad
work
productively.
work
intelligently.
work
together.
MODx
Current
|
Dev
|
SVN Root
|
JIRA (Bugs)
|
Confluence (097 Wiki)
|
Fisheye SVN Browser
openagate
Committed to MODx
Posts: 770
Re: DropMenu. if SelfAsLink = false
«
Reply #4 on:
Dec 22, 2005, 09:57 AM »
Quote from: rthrash on Dec 22, 2005, 08:12 AM
The way the self as link should function in my mind is to turn off only for the page you're on.
Yes, I think so... and for ANY page we're on.
Quote from: rthrash on Dec 22, 2005, 08:12 AM
Was it not doing that properly?
No, if not make the small amendment which I have offered.
See up: If we're on the page "Level 122" and SelfAsLink = false, I don't wanna have page link itself.
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
rthrash
Foundation
Posts: 9,577
Re: DropMenu. if SelfAsLink = false
«
Reply #5 on:
Dec 22, 2005, 10:04 AM »
Out of curiosity, which version of DropMenu are ou using? (from which MODx version)
«
Last Edit: Dec 22, 2005, 10:07 AM by rthrash
»
Logged
MODx
is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you
help us help you
,
read the wiki
, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @
Collabpad
work
productively.
work
intelligently.
work
together.
MODx
Current
|
Dev
|
SVN Root
|
JIRA (Bugs)
|
Confluence (097 Wiki)
|
Fisheye SVN Browser
openagate
Committed to MODx
Posts: 770
Re: DropMenu. if SelfAsLink = false
«
Reply #6 on:
Dec 22, 2005, 10:06 AM »
oops!
I wrote:
"active element of the menu"
I mean:
"the page we're on"
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
openagate
Committed to MODx
Posts: 770
Re: DropMenu. if SelfAsLink = false
«
Reply #7 on:
Dec 22, 2005, 10:10 AM »
Quote from: rthrash on Dec 22, 2005, 10:04 AM
Out of curiosity, which version of DropMenu are ou using? (from which MODx version)
MODx 0.9.0 (x9)
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
openagate
Committed to MODx
Posts: 770
Re: DropMenu. if SelfAsLink = false
«
Reply #8 on:
Dec 29, 2005, 06:00 AM »
New MODx's DropMenu without problem:)
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
rthrash
Foundation
Posts: 9,577
Re: DropMenu. if SelfAsLink = false
«
Reply #9 on:
Dec 29, 2005, 08:37 AM »
Thanks for the update opengate and glad it's working now.
Logged
MODx
is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you
help us help you
,
read the wiki
, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @
Collabpad
work
productively.
work
intelligently.
work
together.
MODx
Current
|
Dev
|
SVN Root
|
JIRA (Bugs)
|
Confluence (097 Wiki)
|
Fisheye SVN Browser
openagate
Committed to MODx
Posts: 770
Re: DropMenu. if SelfAsLink = false
«
Reply #10 on:
Dec 29, 2005, 10:02 PM »
Yeh
&
thank folks -- & who has created, & who helps to develop the MODx!
Logged
Artima -- неуч!
Осторожно: преступная локализация -- modx-cms.ru
yoomai
Full Member
Posts: 247
Re: DropMenu. if SelfAsLink = false
«
Reply #11 on:
Jun 13, 2006, 09:13 AM »
This problem is still valid in 0.9.2.1.: If a document is a folder AND it's below the top level AND you want it not to be a link (selfAsLink=`false`) then DropMenu fails. Like topic starter wrote, change the original code at lines 238 - 245
Code:
// it's a folder and it's below the top level
elseif ($isFolder && $inside)
{
$itm .= ($itsEmpty && $useCategoryFolders) ?
$pre.$child[$textOfLinks].$post . (($debugMode) ? 'subfolder T': '') :
'<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$pre.$child[$textOfLinks].$post.'</a>'. (($debugMode) ? ' subfolder F' :'');
}
to
Code:
// 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 . (($debugMode) ? 'subfolder T': '') : '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$pre.$child[$textOfLinks].$post.'</a>'. (($debugMode) ? ' subfolder F' :'');
}
and you're done.
Thank you, openagate!
Logged
//
yoomai
ddmobley
Jr. Member
Posts: 12
Re: DropMenu. if SelfAsLink = false
«
Reply #12 on:
Jun 13, 2006, 10:22 PM »
DropMenu also displays inconsistent with regard to "selfAsLink" activated. If "selfAsLink" is set to true then the "here" class for the parent document is discarded. If you are styling a menu with CSS using the "here" label, it shouldn't matter whether or not "selfAsLink" is active or not. But DropMenu discards "here" for the parent document in the menu tree if "selfAsLink" is set to "true".
Logged
yoomai
Full Member
Posts: 247
Re: DropMenu. if SelfAsLink = false
«
Reply #13 on:
Jun 14, 2006, 04:48 AM »
Quote from: ddmobley on Jun 13, 2006, 10:22 PM
DropMenu also displays inconsistent with regard to "selfAsLink" activated. If "selfAsLink" is set to true then the "here" class for the parent document is discarded. If you are styling a menu with CSS using the "here" label, it shouldn't matter whether or not "selfAsLink" is active or not. But DropMenu discards "here" for the parent document in the menu tree if "selfAsLink" is set to "true".
http://modxcms.com/forums/index.php/topic,2609.msg17880.html#msg17880
Logged
//
yoomai
davidm
Marketing & Design Team
Posts: 6,780
The best way to predict the future is to invent it
Re: DropMenu. if SelfAsLink = false
«
Reply #14 on:
Jun 14, 2006, 06:05 AM »
Quote from: ddmobley on Jun 13, 2006, 10:22 PM
DropMenu also displays inconsistent with regard to "selfAsLink" activated. If "selfAsLink" is set to true then the "here" class for the parent document is discarded. If you are styling a menu with CSS using the "here" label, it shouldn't matter whether or not "selfAsLink" is active or not. But DropMenu discards "here" for the parent document in the menu tree if "selfAsLink" is set to "true".
I happen to encounter this very problem and it's driving me nuts
!
I didn't connect it to the selfAsLink parameter, I'll try to set it to false see if it solves it... thanks for pointing that out !
I have tried
the hack from Cino
, but it only works with activeTreeOnly hack and I don't want that...
Quote from: yoomai on Jun 14, 2006, 04:48 AM
http://modxcms.com/forums/index.php/topic,2609.msg17880.html#msg17880
Thanks for the pointer !
«
Last Edit: Jun 14, 2006, 06:08 AM by davidm
»
Logged
.:
nodeo.net
: Pour un web libre, moderne et ouvert ! ::
david-molliere.net
:
Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web
:.
***
Forums modxcms.fr
Participez à l'élaboration du site MODx francophone !
***
! Nouveau !
En live, ne manquez pas les news de modxcms.fr sur Twitter
! Nouveau !
MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.
Config :
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
Réalisations sous MODx :
|
pargade-notaires.fr
|
soleil.info
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
jocelyne-violet.net
Pages: [
1
]
2
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
=> Internationalization
===> Bulgarian
===> Chinese
===> Czech
===> Dutch
===> French
===> German
===> Irish
===> Italian
===> Japanese
===> Polish
===> Portuguese
===> Russian
===> Slovak
===> Spanish
===> Swedish
===> Persian - فارسي
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.2
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> QuickEdit
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Web Design and Development
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
Czech Community
-----------------------------
=> Oznámení
===> Důležitá oznámení/novinky
===> Bezpečnost
=> Podpora
===> FAQ (často kladené otázky)
===> Instalace
===> Moduly, pluginy, "snippets & code" (šablony zdrojových kódů)
===> Design & Šablony
=> Dokumentace, tutoriály (návody) a překlady
===> Dokumentace
===> Tutoriály (návody)
===> Překlady (lokalizace)
=> Komunita
===> Oznámení
===> Představte se, prosím
===> Ukázky práce
===> Různé aneb cokoli co se jinam nehodí
-----------------------------
Bulgarian Community
-----------------------------
=> Поддръжка
===> Често задавани въпроси
===> Инсталация
===> Модули, Плъгини, Снипети и код
===> Дизайн и Шаблони
=> Документация, Ръководства и Превод
===> Документация
===> Ръководства
===> Превод
=> Общество
===> Съобщения
===> Представете се
===> Представете сайта си
===> Дискусии извън MODx
-----------------------------
Dutch Community
-----------------------------
=> Ondersteuning
===> Veel gestelde vragen
===> Modules, Plugins, Snippets & Code
===> Design & Templates
=> Documentatie, Tutorials en Vertalingen
===> Documentatie
===> Tutorials
===> Vertalingen
=> Community
===> Aankondigingen
===> Stel jezelf voor
===> Site Showcase
===> De stamkroeg
-----------------------------
Finnish Community
-----------------------------
=> Tuki
===> UKK
===> Asennus
===> Moduulit, liitännäiset, koodinpätkät
===> Ulkoasu/Sivustopohjat
=> Dokumentaatio, oppaat ja käännökset
===> Dokumentaatio
===> Käännökset
===> Oppaat
=> Yhteisö
===> Tiedotteet
===> Esittele itsesi
===> MODx sivustosi
===> Kahvihuone
-----------------------------
Filipino Community
-----------------------------
=> Suporta
===> Kadalasang tanong
===> Instalasyon
===> Moduler, Maidadagdag, Karagdagang mga Code
===> Desenyo at Templates
=> Dokumentasyon, Mga Turo, Mga Salin
===> Dokumentasyon
===> Mga Turo
===> Mga Salin
=> Kumunidad
===> Anunsyo
===> Ipakilala ang sarili
===> Ang Galing ng pinoy
===> Tsismisan atbp
-----------------------------
French Community
-----------------------------
=> Support
===> FAQ
===> Installation
===> Module, plugin, snippets
===> Design/Templates
=> Documentation, Tutoriels et Traductions
===> Documentation
===> Traduction
===> Tutoriels
=> Communauté
===> Annonces
===> Présentez vous
===> Vos sites
===> Le Bistrot Français
-----------------------------
German Community
-----------------------------
=> Support (de)
===> FAQ (de)
===> Installation (de)
===> Module, Plugins, Snippets & Code (de)
===> Design & Templates (de)
=> Dokumentation, Tutorials und Übersetzung
===> Dokumentation
===> Tutorials (de)
===> Übersetzung
=> Community (de)
===> Ankündigungen
===> Stellt Euch vor
===> Beispielseiten
===> Off Topic / Verschiedenes
-----------------------------
Irish Community
-----------------------------
=> Tacaíocht
===> CC Ceisteanna Coitianta
===> Breiseáin (cláir bhreise), Snippets & Comhaid
===> Suiteáil
===> Dearadh & Teimpléid
=> Doiciméid, Teagascóireacht agus Aistriúchán
===> Doiciméadú
===> Teagascóireacht
===> Aistriúchán
=> Pobal
===> Fógraí
===> Cuir Tú Féin in Aithne
===> Gailearaí an Láithreáin
===> Caifé / An Tábhairne / Ábhar Cainte Eile / Ilghnéitheach
-----------------------------
Italian Community
-----------------------------
=> Supporto
===> FAQ
===> Installazione
===> Moduli, Plugin, Snippet e altro codice
===> Web Design e Template
=> Documentazione, Tutorial e Traduzione
===> Documentazione
===> Tutorial
===> Traduzione
=> Comunità
===> Annunci
===> Presentazioni
===> Siti in vetrina
===> Chiacchiere in libertà
-----------------------------
Japanese Community
-----------------------------
=> サポート
===> 良くある質問
===> インストール
===> モジュール・プラグイン・スニペット・本体
===> デザインやテンプレート
=> マニュアル・テュートリアル・翻訳
===> マニュアル
===> 事例集、テュートリアル
===> 日本語化
=> コミュニティ
===> お知らせ
===> MODxサイト展示場
===> 自己紹介
===> 雑談
===> 国産リソース
-----------------------------
Persian Community
-----------------------------
=> پشتيباني
===> راهنما
===> نصب
===> ماژول , پلاگین ها , کد ها و جزییات
===> طراحی و قالب ها
=> مستند سازی , آموزش ها و ترجمه ها
===> مستند سازی
===> آموزش ها
===> ترجمه ها
=> انجمن ها
===> اخبار
===> معرفی کردن خود
===> نمایش دادن سایت ها
===> بحث های عمومی و سایر موضوعات
-----------------------------
Polish Community
-----------------------------
=> Wsparcie
===> FAQ
===> Instalacja
===> Moduły, pluginy, snipety i kod
===> Wygląd i szablony
=> Dokumentacja, tutoriale i tłumaczenie
===> Dokumentacja
===> Tutoriale
===> Tłumaczenie
=> Społeczność
===> Ogłoszenia
===> Przedstaw się
===> Twój serwis WWW
===> Hyde Park
-----------------------------
Portuguese Community
-----------------------------
=> Suporte
===> FAQ - Dúvidas Frequentes
===> Instalação
===> Módulos, Plugins, Snippets e Código
===> Design e Templates
=> Documentação, Guias e Traduções
===> Documentação
===> Guias
===> Traduções
=> Comunidade
===> Anúncios
===> Apresente-se!
===> Bar da esquina (fora de tópico)
===> Portfólio de Sites
-----------------------------
Russian Community
-----------------------------
=> Поддержка
===> ЧАВО (FAQ)
===> Установка
===> Модули, плагины, сниппеты и код
===> Дизайны и шаблоны
=> Документация, Уроки, Перевод
===> Документация
===> Уроки
===> Перевод
=> Сообщество
===> Объявления
===> Представьтесь публике
===> Галерея сайтов
===> Диван
-----------------------------
Scandinavian Community
-----------------------------
=> Support
===> Frågor och svar
===> Installation
===> Moduler, plugins, snippets och kod
===> Design & sidmallar
=> Dokumentation, guider och översättningar
===> Dokumentation
===> Guider
===> Översättningar
=> Webbgemenskap
===> Meddelanden
===> Presentera dig själv
===> Visa upp dina webbsidor
===> Ordet fritt
-----------------------------
Spanish Community
-----------------------------
=> Soporte
===> FAQ
===> Instalación
===> Modulos, Plugins, Snippets & Código
===> Diseño y plantillas
=> Documentación, Tutoriales y Traducciones
===> Documentatción
===> Tutoriales
===> Traducciones
=> Comunidad
===> Anuncios
===> Presentaciones personales
===> Muestra de sitios
===> El Café
-----------------------------
TÜRKÇE (Turkish)
-----------------------------
=> Destek
===> SSS
===> Kurulum
===> Modüller, Pluginler, Snippetlar & Kodlar
===> Dizayn & Temalar
=> Belgeleme, Eğitmenler ve Çeviri
===> Belgeleme
===> Eğitmenler
===> Çeviri
=> Topluluk
===> Duyurular
===> Kendinizi Tanıtın
===> Site Vitrini
===> Konu Dışı