pieces-pages should have a showPage flag
Two iterations ago, we discussed the potential negative implications of default contextual: true and it was noted that many developers create piece types that are intended to appear in a list view on an index page, but NEVER have a show page (ex. news posts that just link out to external articles).
It was proposed that we introduce a showPage flag to pieces-pages that would address this use case. My thinking is that showPage: false will automatically set its corresponding piece type to contextual: false and override a contextual: true flag if explicitly set.
Please see my comments on #900 and #932, there are implementation and bc break questions.
Does this ticket still make sense given our decision to document and promote the use of contextual: true in appropriate use cases? Maybe we want showPage: false to mean that there are no _url properties for pieces and they can't come up as search results (a necessary consequence of having nothing to link to)?
I'm a little lost in the winding path this has taken BUT YES, there are still cases where show pages are never needed and would be misleading. Having them not appear in search and not produce a _url property feel like good safeguards. Are there other things this flag should prevent?
Yeah, that sounds good to me
Hey, I was looking for a way to make the "Page Menu" actually refer to the currently visible piece when users were looking at a show.html template of a particular piece. Was happy to find that the contextual option did just this!
When I tried to follow the different tickets and the PR that have been open around this – do I understand it correctly that contextual: true will not be the default, but only the recommended workflow?
Couldn't there be a way of making the "Page Menu" realise by default when the user is actually viewing a piece? Seems like a sane default to me
contextual: true has some effects that would not work well if we just suddenly made it the default, as it would be altering the experience when there are no pieces-pages at all for a piece type.
On Thu, Sep 13, 2018 at 3:39 AM, Fredrik Ekelund [email protected] wrote:
Hey, I was looking for a way to make the "Page Settings" menu actually refer to the currently visible piece when users were looking at a show.html template of a particular piece. Was happy to find that the contextual option did just this!
When I tried to follow the different tickets and the PR that have been open around this – do I understand it correctly that contextual: true will not be the default, but only the recommended workflow?
Couldn't there be a way of making the "Page Settings" menu realise by default when the user is actually viewing a piece? Seems like a sane default to me
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/931#issuecomment-420913637, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB9fen47EJa1xvADNZ3yBjT80-xEvV2ks5uagungaJpZM4OYW_S .
--
THOMAS BOUTELL, CHIEF SOFTWARE ARCHITECT P'UNK AVENUE | (215) 755-1330 | punkave.com
That much I gathered, and there was a suggestion then to add a separate showPage option to counteract any BC issues - is that correct?
But couldn't contextual: true be infered based on the presence of a show.html template in a pieces-pages module?
There is a show.html in the base module too, which beginners sometimes use to get started. This isn't a good 2.x change (: Possibly something to tweak in 3.x.
On Thu, Sep 13, 2018 at 7:21 AM, Fredrik Ekelund [email protected] wrote:
That much I gathered, and there was a suggestion then to add a separate showPage option to counteract any BC issues - is that correct?
But couldn't contextual: true be infered based on the presence of a show.html template in a pieces-pages module?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/931#issuecomment-420972882, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB9fTBSzQQbNR1HBS3Qk4sBBv8IrIcPks5uaj-hgaJpZM4OYW_S .
--
THOMAS BOUTELL, CHIEF SOFTWARE ARCHITECT P'UNK AVENUE | (215) 755-1330 | punkave.com