Lukas Renggli wrote:
In the
Pier-Jetsam-Environment package, I have moved the "layout
settings" group of definitions out of PRStructure, since the structure
itself doesn't need to know anything about how it is to be displayed.
Why not? I have websites where every top level structure has its own
look.
Sure that's what I do too.
But the structure itself has nothing to do with determining its usage or
look. It does keep hold of arbitrary properties, but those properties
are specified by the "frame" that is going to be displaying the
structure, not by the structure itself.
As an example the "AdminFrame" stores the current theme colour in the
structure's properties. Since the "AdminFrame" has a fixed layout
determined by the class, there is no need for structures to have an
#environment or #stylesheet setting wen displayed with the "AdminFrame"
The "ContentWithStyle" frame stores the current layout selection in the
structures properties, there are 7 choices.
1 col, 2 col, 3 col etc etc.
So in my model, structures have their properties, which the display
frame may make use of. However Structures have no knowledge of their own
as to how they are to be used. Its the same "children" shouldnt know too
much about their "parents" use-cases issue.
I am now
attempting and failing to put a link to the PRSettingsCommand
in the seaside toolbar, is this possible?
Ouch, Seaside Toolbar? I usually keep that disabled.
I agree it would be simpler if it was factored out... I have factored it
out into a decoration-helper. I am still hoping that you will see your
way to support Session/Decoration helpers in 2.9. For me the Toolbar
decoration becomes enabled via the ToolbarHelper when a suitably
qualified user logs in.
Sure, you can render a link to a specific Pier page
from any Seaside
component. Assuming that "self context" is the current context you can
write:
html anchor
goto: (self context command: PRSettingsCommand);
with: 'Settings'
Unfortunately the WAToolbar frame is outside of withContextDo: So I dont
think that this will work.
Keith