|
From: Shane <sh...@lo...> - 2004-02-02 22:24:37
|
On Feb 2, 2004, at 2:34 PM, Cliff Wood wrote:
> Speaking as a Generic-Slash-Developer
>
> As near as I can tell, there are two types of sections: "contained"
> and "collected".
>
> If you have a "contained" section, you limit the objects in question
> to only those of that specific section.
>
> If you have a "collected" section, you limit the objects in question to
> ALL sections that are "collected" in the section referenced.
>
> The "index" section is a "collected" section, so I'd say that you'd
> display only the objects (in your case galleries) that are collected
> by the "index" section. Likewise if you had a "collected" section
> called "shane-mtb", you'd display all of the galleries collected in
> the "shane" and the "mtb" section.
>
> My point here is that I think you are mistaking the intent of the
> "index" section, and that is why you are confused. Stick with the
> general rules of section types and I think you'll most likely match
> the "generally expected section behavior".
ok, an example then, if you don't mind :)
site has:
sections:
type issitedefault
---------------------------------------------
index collection no
articles contained yes
features contained no
cars collection no
a plugin, called plugin.pl. it's data objects can have a section/topic
associated with each.
So when someone hits /plugin.pl, they are actually section=='index',
and the code should do:
# This handles section.url's defining the section in Slash::Apache
I think
my $section = $reader->getSection($form->{section});
# If it wasn't set in the URL passed to us to get us here, then
we'll set it with
# the section that's coming found from Apache, or, use the
user_currentSection
$form->{section} ||= $section->{section} ||
$user->{currentSection} || '';
# And lastly, a double check, since 'index' is a pseudo-section
$form->{section} = '' if $form->{section} eq 'index';
At that point, the plugin should list any data which has the following
association:
data that has:
a. no section assigned or
b. *any* section that is *not* a contained section
Do you agree?
Now, section features is contained. It has a URL of features.tld.com.
So if someone hits
http://features.tdl.com/plugin.pl
the plugin should only grab data that is section=='features', and
absolutely no other
section.
And finally, section 'cars' is a collection of sections. It has a URL
of cars.tld.com. So if someone hits
http://cars.tdl.com/plugin.pl
the plugin should only grab data that is section=='cars', and
absolutely no other
section.
Do you agree?
If you don't agree, how do you define what sections are in the index
section's 'collection'? Or are they all, no matter what???
It would seem I understand the that you're saying if a section is a
collection, then you grab everything underneath it. And if it's
contained, then it can not be part of a collection.
However, index doesn't seem to follow that rule for most sites then.
Things like articles, and features, should be subsections of index.
Because inorder for you to be in section=='index', index is a
collection and should never show a contained section's (ie articles, or
features) data.
If I haven't lost you - *this* is where I am looking to define the
default behavior.
Because it would seem that a plugin should give you the list of it's
data, and then a pulldown to let you filter that list by
section/topic/whatever. Example:
http://www.lottadot.com/galleria.pl
The thing is - to pick on the section pulldown - should that pulldown
actually *not* have the 'mtb' section in it, because that 'mtb' section
is contained?
And then following that logic - if you hit
http://mtb.lottadot.com/galleria.pl
that's section=='mtb'. It's a contained section. So, if it had
subsections, then it should show a section pulldown. Otherwise, it
should not, because it's contained, a contained section limits to that
in and of itself, and ignores all other sections?
Part of what I'm getting at (I'll bring this in, to make things more
confusing), is the idea of the isolated sections (parts of which are
still in the code). It used to be that you could create a section, mark
it isolated, and *nothing* would link/reference that section. Hence,
it's hidden, unless you are specifically told about it. At first I
thought the 'contained' section was the direct replacement for the
isolated section, but now I'm not so sure.
Thanks,
Shane
PS: One question: if a section is not the index, and it is marked as
type 'collection', then is it not actually a collection of subsections?
|