MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Sep 06, 2008, 01:41 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
modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Read
Frequently Asked Questions (FAQ)
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Navigation & Tagging/Taxonomy
»
Wayfinder (and DropMenu)
(Moderators:
zi
,
kylej
,
PaulGregory
)
»
Wayfinder and Unpublished Docs?
Pages: [
1
]
Go Down
« Previous topic
Next topic »
Print
Author
Topic: Wayfinder and Unpublished Docs? (Read 1745 times)
0 Members and 1 Guest are viewing this topic.
pixelchutes
Coding Team
Posts: 801
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: 801
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
Marketing & Design Team
Posts: 6,590
The best way to predict the future is to invent it
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
blog.nodeo.net
:
Pour un web libre, moderne et ouvert!
:: |
! Nouveau !
Les forums modxcms.fr
:
Participez à l'élaboration du site MODx francophone !
! 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.5 | Debian 4.0 (Etch)
Réalisations sous MODx :
nodeo.net
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
sworld.com
|
soleil.info
et 3 autres en cours de réalisation
dev_cw
Testers
Posts: 2,242
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
|
Snippet Call Anatomy
|
Document Specific Variables
Hey Brian, there is a message in my Alphabits. It says Ooooooo.
Peter, those are Cherios.
davidm
Marketing & Design Team
Posts: 6,590
The best way to predict the future is to invent it
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
blog.nodeo.net
:
Pour un web libre, moderne et ouvert!
:: |
! Nouveau !
Les forums modxcms.fr
:
Participez à l'élaboration du site MODx francophone !
! 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.5 | Debian 4.0 (Etch)
Réalisations sous MODx :
nodeo.net
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
sworld.com
|
soleil.info
et 3 autres en cours de réalisation
BobRay
Coding Team
Posts: 1,240
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,326
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
davidm
Marketing & Design Team
Posts: 6,590
The best way to predict the future is to invent it
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
blog.nodeo.net
:
Pour un web libre, moderne et ouvert!
:: |
! Nouveau !
Les forums modxcms.fr
:
Participez à l'élaboration du site MODx francophone !
! 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.5 | Debian 4.0 (Etch)
Réalisations sous MODx :
nodeo.net
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
sworld.com
|
soleil.info
et 3 autres en cours de réalisation
pixelchutes
Coding Team
Posts: 801
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: 1,240
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: 2,242
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
|
Snippet Call Anatomy
|
Document Specific Variables
Hey Brian, there is a message in my Alphabits. It says Ooooooo.
Peter, those are Cherios.
pixelchutes
Coding Team
Posts: 801
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: 1,240
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: 41
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
=> Internationalization
===> Bulgarian
===> Chinese
===> Czech
===> Dutch
===> French
===> German
===> Irish
===> Italian
===> Japanese
===> Polish
===> Portuguese
===> Russian
===> Slovak
===> Spanish
===> Swedish
===> Persian - فارسي
-----------------------------
Support
-----------------------------
=> Release Support
===> 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 (and 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
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> PHx
=> Templates
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Web Design and Development
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
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ışı