[Zope] Changing Contexts (Was: [Zope] Acquisition? Did I just lose
my Zen?)
Paulo Eduardo Neves
neves@email.com
Wed, 22 Sep 1999 18:52:39 -0300
> Paulo Eduardo Neves wrote:
> >
> > "Jay R. Ashworth" wrote:
> > >
> > > Got it. Then, I agree with the other folks. How can you override the
> > > context of the place where you acquired it _from_ with the context of
> > > the place where you acquired it _to_? That would seem to be a very
> > > important ability...
> >
>
I gave some examples and Michel Pelletier wrote:
>
> One thing I'd like to point out here, is that you are getting into
> something very, very deep. This discussion has gone pretty far, but I
> still dont get it.
I also think it is complex. So complex that I initially had a
misconception about how acquisition works. I was glad to see that I was
not the only one:-)
> What I want to see is a very, very trivial example
> of what you want to do, and why you can't do it now. There may be
> another solution.
I think I won't be able to give you a very trivial example. Zope is so
powerful that it can handle all trivial examples I can think. Trivial
things like the /print folder for a printable page can be handled other
ways like the ?pp=1 argument to get printable pages in Zope.org. I
believe a /print folder would be more elegant, but is just a matter of
taste. No need to modify Zope:-)
I was really thinking about a structure to build multi-lingual sites.
I'll try to sketch an example.
Suppose you have the following objects in your root folder:
myContents
/folder
mySQLMethod <= these are contained in /folder
index_html
/portuguese
myContents
The root folder also has a string property LG="en". It has a folder
named /portuguese that has a string property LG="pt", and a myContents
document which text is written in portuguese.
Suppose index_html has all the page formatting and it also includes
myContents and use the results of the query mySQLMethod. mySQLMethod
would query a database table that has two contents fields, let's call
them "content_en" and "content_pt". This is a possible implementation:
SELECT content_id, date, <dtml-var "'content_' + LG"> as content
FROM Table
If acquisition worked according to Martjin, calling /folder would show
an english version of the site, and /portuguese/folder would give an
portuguese version.
Is it reasonable? It would be a nice way to approach the hard problem of
multi-lingual dynamic sites.
>
> The next point is that we will soon be modeling this.
...
> Acquisition needs to be modeled, then we can truely get what's going on
> here.
Great! Zope documentation are really improving a lot. Each time there is
less excuses for not use Zope.
> In the meantime, let's hear some simplification of this problem,
> I'm still lost on what we're talking about.
Hope this helped.
best regards,
--
Paulo Eduardo Neves
maito:neves@email.com