Keith Hodges | 23 Apr 20:12

Re: Cool Idea!


>> The second class PRPierBasicBP moves the layout to:
>>
>> /environment/layout
>> /environment/style
>>
>> Again it will be cached for you "off-site" until an environment is  
>> added.
>>     
>
> I guess I'll have to look at the source code. I don't understand how  
> different are supposed to work then? For example seaside.st uses 4  
> different environments, my personal site uses 2.
>
>   
No different... perhaps I should have written:

The path that a page uses to find its layout is:

*<one of my parent's local environment>*/environment/layout
*<one of my parent's local environment>*/environment/style

So I can have

/site/environment-1/layout
/site/environment-1/style

/site/environment-2/layout
/site/environment-3/style
/site/environment-4/layout

If my content looks like..

/home/intro/mine/cv

If /home/intro's local environment is set to environment-1, it and all 
of its children get the layout and style from environment-1.

But /home has no environment so it will use the one cached and supplied 
by the PRFrameSubclass component.

If cv is set to environment-3 , it will use the style from 
environment-3, and the layout from environment-1
...

Adding this configuration as a PRKernel setting, isnt quite the right 
place. PRKernel is part of the Model, and should not include any seaside 
elements to do with rendering of the model. You could argue that the 
environment is part of the "data", but it isnt really, its "the 
configuration of the rendering". If seaside was not loaded then you 
wouldnt need it.

I think PRPierFrame is the right place:

Scenario: I have written a Seaside application and I want to write some 
user documentation. I put a link in my application to "Help", Help calls 
a component which renders the pier documents in response to 
#openOnTopic: , with a nice "Return" button at the bottom. That 
component would be a variant of PRPierFrame, called 
PRPierFrameReadOnlyReference.

For authoring the help documents I can use a full normal installation of 
pier, but in place in another application, it would be nice to be able 
to have the whole of pier as a component.

best regards

Keith

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


Gmane