MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Jul 05, 2009, 01:26 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
:Read what MODx Developers say:
MODx Dev. Blogs
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Navigation & Tagging/Taxonomy
»
Wayfinder & DropMenu
(Moderator:
kylej
)
»
Wayfinder and Unpublished Docs?
Pages: [
1
]
Go Down
« Previous topic
Next topic »
Print
Author
Topic: Wayfinder and Unpublished Docs? (Read 3383 times)
0 Members and 1 Guest are viewing this topic.
pixelchutes
Coding Team
Posts: 839
Wayfinder and Unpublished Docs?
«
on:
Aug 25, 2007, 07:22 PM »
I have been reviewing the following:
http://www.muddydogpaws.com/development/wayfinder/parameters.html
...but have not been able to find what I am looking for. Maybe it's not even an option!?
Can Wayfinder work with "Unpublished" documents? It doesn't appear so....Hmm, does a parameter to override filtering of unpublished docs exist, similar to Ditto's?
Logged
Mike Reid -
www.pixelchutes.com
MODx Team Member / Contributor
[Module]
SiteSearch
/ [Snippet]
DocPassword
/ [Plugin]
EditArea
/ We support
FoxyCart
________________________________
Where every
pixel
matters.
pixelchutes
Coding Team
Posts: 839
Re: Wayfinder and Unpublished Docs?
«
Reply #1 on:
Aug 25, 2007, 07:38 PM »
Update:
For those looking to
use Wayfinder 2.0 with Unpublished Documents
, here is a preliminary patch that seems to do the trick. Please note, this has not been tested in more advanced, deeply nested list situations. It simply introduces the
hideUnpublished
parameter. If defined w/ a value of
0
, Wayfinder will include unpublished documents from the current branch within the result set.
2 simple patches:
Edit
assets/snippets/wayfinder/wayfinder.inc.php:
(Line 351)
1.
Replace:
Code:
$sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc LEFT JOIN {$tbldg} dg ON dg.document = sc.id WHERE sc.published=1 AND sc.deleted=0 AND ({$access}){$menuWhere} AND sc.id IN (".implode(',',$ids).") GROUP BY sc.id ORDER BY {$sort} {$this->_config['sortOrder']} {$sqlLimit};";
With:
Code:
// pixelchutes - Work with unpublished documents - 6:19 PM 8/25/2007
$sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc LEFT JOIN {$tbldg} dg ON dg.document = sc.id WHERE sc.published<>".( $this->_config['hideUnpublished'] ? 0 : 2 )." AND sc.deleted=0 AND ({$access}){$menuWhere} AND sc.id IN (".implode(',',$ids).") GROUP BY sc.id ORDER BY {$sort} {$this->_config['sortOrder']} {$sqlLimit};";
//$sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc LEFT JOIN {$tbldg} dg ON dg.document = sc.id WHERE sc.published=1 AND sc.deleted=0 AND ({$access}){$menuWhere} AND sc.id IN (".implode(',',$ids).") GROUP BY sc.id ORDER BY {$sort} {$this->_config['sortOrder']} {$sqlLimit};";
2.
Edit
Wayfinder
snippet: (v2.0/MODx v0.9.6 - Line 61)
Add the following new parameter to
Line 61
Code:
'hideUnpublished' => isset($hideUnpublished) ? $hideUnpublished: TRUE, // pixelchutes - work with unpublished documents
That's it!
Simply pass hideUnpublished in your Wayfinder snippet call:
Code:
[[Wayfinder? &hideUnpublished=`0` &startId=`[*id*]`]]
with your snippet call to include Unpublished Documents with Wayfinder!
* Further testing in more advanced scenarios should take place to confirm desired functionality
«
Last Edit: Aug 25, 2007, 09:02 PM by pixelchutes
»
Logged
Mike Reid -
www.pixelchutes.com
MODx Team Member / Contributor
[Module]
SiteSearch
/ [Snippet]
DocPassword
/ [Plugin]
EditArea
/ We support
FoxyCart
________________________________
Where every
pixel
matters.
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: Wayfinder and Unpublished Docs?
«
Reply #2 on:
Mar 02, 2008, 06:25 AM »
Exactly what I was looking for !
Works as advertised, thanks !
It would be nice if it made it into the next wayfinder release...
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.67 - PHP 5.2.8 | 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
dev_cw
Testers
Posts: 4,024
Re: Wayfinder and Unpublished Docs?
«
Reply #3 on:
Mar 02, 2008, 06:31 AM »
Interesting that this is such an 'old' post. I have seen requests for this often and never knew that there was a posted solution.
Bookmarked now for future reference
Logged
Shane Sponagle
|
[wiki] Snippet Call Anatomy
|
MODx Developer Blog
|
[nettuts] Working With a Content Management Framework: MODx
Something is happening here, but you don't know what it is.
Do you, Mr. Jones? - [bob dylan]
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: Wayfinder and Unpublished Docs?
«
Reply #4 on:
Mar 02, 2008, 06:52 AM »
Neither did I until I had to find a solution for this and Google brought me here...
I am amazed to see how old the post was (missed it) and how little feedback there was...
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.67 - PHP 5.2.8 | 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
BobRay
Coding Team
Posts: 3,175
Re: Wayfinder and Unpublished Docs?
«
Reply #5 on:
Mar 02, 2008, 04:13 PM »
Could you guys satisfy my curiosity about why you would want Wayfinder to work with unpublished docs?
Bob
Logged
MODx info for newbies:
http://bobsguides.com/MODx.html
ganeshXL
Testers
Posts: 1,927
true is true
Re: Wayfinder and Unpublished Docs?
«
Reply #6 on:
Mar 02, 2008, 05:40 PM »
Yep, I'm curious as well. If it's just for previewing new pages, wouldn't it be easier to just use doc-groups + user-groups?
Logged
http://www.screengang.com/
·
http://www.dnik.ch/
·
http://www.flickr.com/photos/dnik/
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: Wayfinder and Unpublished Docs?
«
Reply #7 on:
Mar 03, 2008, 02:51 AM »
You're right it's for previewing pages, and yes I have been using doc groups and user groups in the past but on this one, I had to duplicate the entire tree for a website which is undergoing a total re-structuring / re-writing and those pages have several doc groups and user groups tied to them. It was easier in my opinion to keep those unpublished...
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.67 - PHP 5.2.8 | 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
pixelchutes
Coding Team
Posts: 839
Re: Wayfinder and Unpublished Docs?
«
Reply #8 on:
Mar 04, 2008, 01:38 PM »
Quote from: BobRay on Mar 02, 2008, 04:13 PM
Could you guys satisfy my curiosity about why you would want Wayfinder to work with unpublished docs?
Bob
I thought it had something to do with trying to use
&includeDocs=`123`
where doc_id 123's parent was an unpublished container...However, I tried a few different scenarios/test cases and that doesn't seem to be the case. I couldn't find a valid scenario that justified how this parameter might be leveraged, however I do like the idea of optionally using it temporarily during development, however.
Honestly, it's been awhile and now I can't even remember! Glad to see it managed to help someone
«
Last Edit: Mar 04, 2008, 01:47 PM by pixelchutes
»
Logged
Mike Reid -
www.pixelchutes.com
MODx Team Member / Contributor
[Module]
SiteSearch
/ [Snippet]
DocPassword
/ [Plugin]
EditArea
/ We support
FoxyCart
________________________________
Where every
pixel
matters.
BobRay
Coding Team
Posts: 3,175
Re: Wayfinder and Unpublished Docs?
«
Reply #9 on:
Mar 04, 2008, 03:49 PM »
What confuses me is that if you use it during development, it seems visitors to the site would see the unpublished documents, so why not just publish them?
Bob
Logged
MODx info for newbies:
http://bobsguides.com/MODx.html
dev_cw
Testers
Posts: 4,024
Re: Wayfinder and Unpublished Docs?
«
Reply #10 on:
Mar 04, 2008, 03:58 PM »
I have a case where the client wants to be able to see unpublished documents while logged in and editing. Since you cant change document group from the front-end that is not an option. After all QuickEdit lets you publish unpublished documents but you need to know where they are. and while logged as manager you can view unpublished docs.
I resolved this with a ditto call in a 'hidden' chunk. But if I could add these to the live menu (maybe with a different style) this could have worked.
I can think of a few other situations where this could be useful, all involving front-end site management. I have one site with @ 30 editors and some just don't like to use the manager so by keeping it in the front-end they are happy.
Logged
Shane Sponagle
|
[wiki] Snippet Call Anatomy
|
MODx Developer Blog
|
[nettuts] Working With a Content Management Framework: MODx
Something is happening here, but you don't know what it is.
Do you, Mr. Jones? - [bob dylan]
pixelchutes
Coding Team
Posts: 839
Re: Wayfinder and Unpublished Docs?
«
Reply #11 on:
Mar 04, 2008, 04:37 PM »
Quote from: BobRay on Mar 04, 2008, 03:49 PM
What confuses me is that if you use it during development, it seems visitors to the site would see the unpublished documents, so why not just publish them?
Bob
True. Of course this obviously depends on your development environment, etc.
When developing on a live production box/active domain, I normally have my MODx sites completely disabled (turned off in site config) until they are ready. Sometimes I choose to develop sites using just the IP Address or the local file system which would work out ok.
«
Last Edit: Mar 04, 2008, 04:39 PM by pixelchutes
»
Logged
Mike Reid -
www.pixelchutes.com
MODx Team Member / Contributor
[Module]
SiteSearch
/ [Snippet]
DocPassword
/ [Plugin]
EditArea
/ We support
FoxyCart
________________________________
Where every
pixel
matters.
BobRay
Coding Team
Posts: 3,175
Re: Wayfinder and Unpublished Docs?
«
Reply #12 on:
Mar 04, 2008, 04:41 PM »
Quote from: dev_cw on Mar 04, 2008, 03:58 PM
I have a case where the client wants to be able to see unpublished documents while logged in and editing. Since you cant change document group from the front-end that is not an option. After all QuickEdit lets you publish unpublished documents but you need to know where they are. and while logged as manager you can view unpublished docs.
I resolved this with a ditto call in a 'hidden' chunk. But if I could add these to the live menu (maybe with a different style) this could have worked.
I can think of a few other situations where this could be useful, all involving front-end site management. I have one site with @ 30 editors and some just don't like to use the manager so by keeping it in the front-end they are happy.
That makes sense. I have a site where I use the Personalize snippet to show a different wayfinder menu to logged in users. IOW, there are two Wayfinder menus in two separate chunks. Logged in users get one and regular visitors get the other.
Bob
Logged
MODx info for newbies:
http://bobsguides.com/MODx.html
tirithen
Jr. Member
Posts: 45
Re: Wayfinder and Unpublished Docs?
«
Reply #13 on:
Jun 26, 2008, 03:02 AM »
This is a great addition to the Wayfinder snippet, but I'm wondering if there is a simple way to make it possible for logged in users to show the unpublished documents that Wayfinder now create links for? As I think already said above it would be great to be able to set a different css class for the unpublished documents.
Logged
Pages: [
1
]
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
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> Front-end Document Management
=> 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
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.3
===> 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
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Webworker Lounge
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
International Support & Translations
-----------------------------
=> Internationalization
=> Bulgarian
===> Поддръжка
=====> Често задавани въпроси
=====> Инсталация
=====> Модули, Плъгини, Снипети и код
=====> Дизайн и Шаблони
===> Документация, Ръководства и Превод
=====> Документация
=====> Ръководства
=====> Превод
===> Общество
=====> Съобщения
=====> Представете се
=====> Представете сайта си
=====> Дискусии извън MODx
=> Chinese
=> Czech
===> Oznámení
=====> Důležitá oznámení/novinky
=====> Bezpečnost
===> Komunita
=====> Oznámení
=====> Představte se, prosím
=====> Ukázky práce
=====> Různé aneb cokoli co se jinam nehodí
===> 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)
=> Dutch
===> 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
=> Filipino
===> 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
=> Finnish
===> 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
=> French
===> 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
===> 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
=> Hebrew
===> הכרזה
=====> חדשות חשובות
=====> אבטחה
===> תמיכה
=====> התקנה
=====> תיעוד, מדריכים ותרגומים
=====> עיצוב ותבניות
=====> שאלות נפוצות
===> תיעוד, מדריכים ותרגומים
=====> תיעוד
=====> מדריכים
=====> תרגומים
===> קהילה
=====> הודעות
=====> הצג את עצמך
=====> אתרים לדוגמא
=====> כללי
=> Irish
=> Italian
===> 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
===> サポート
=====> 良くある質問
=====> インストール
=====> モジュール・プラグイン・スニペット・本体
=====> デザインやテンプレート
===> マニュアル・テュートリアル・翻訳
=====> マニュアル
=====> 事例集、テュートリアル
=====> 日本語化
===> コミュニティ
=====> お知らせ
=====> MODxサイト展示場
=====> 自己紹介
=====> 雑談
=====> 国産リソース
=> Persian - فارسي
===> پشتيباني
=====> راهنما
=====> نصب
=====> ماژول , پلاگین ها , کد ها و جزییات
=====> طراحی و قالب ها
===> مستند سازی , آموزش ها و ترجمه ها
=====> مستند سازی
=====> آموزش ها
=====> ترجمه ها
===> انجمن ها
=====> اخبار
=====> معرفی کردن خود
=====> نمایش دادن سایت ها
=====> بحث های عمومی و سایر موضوعات
=> Polish
===> 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
===> 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
===> Поддержка
=====> ЧАВО (FAQ)
=====> Установка
=====> Модули, плагины, сниппеты и код
=====> Дизайны и шаблоны
===> Документация, Уроки, Перевод
=====> Документация
=====> Уроки
=====> Перевод
===> Сообщество
=====> Объявления
=====> Представьтесь публике
=====> Галерея сайтов
=====> Диван
=> Scandanavian
===> 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
=> Slovak
=> Spanish
===> 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é
=> Swedish
=> 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ışı