[Typo3-dev] feature-patch for pi_list_browseresults

Christopher tombedlam at yahoo.com
Sun Oct 31 18:09:29 CET 2004


Hi there,

--- "Michael H.E. Roth" <mher at mher.de> wrote:

> Christopher wrote:
 
> > I think this is a poor option. It's just another way of forcing
> people
> > to use a particular sort of markup that might not be appropriate to
> the
> > purpose. I don't really see what would be gained over the current
> table
> > method. 
> sorry? I think you didn't read the whole thread! 

<snipped list of interesting new config options>

> there's absolutely no force to use any kind of markup at all. OK,
> maybe
> some nesting for conveniance... but that can be overcome by
> reorganizing
> your "wrappers"

Sorry, I have read the whole thread, but I've probably also
misunderstood you. The new wrappers are definitely helpful additions,
but I thought you were saying that the two parts of the output would
still be in the same container. If so, even the new parameters wouldn't
be *that* much of an improvement (what if I need them positioned
separately?) since every part of the existing output is already
stylable using css (e.g. "div table td a {}") - though it would be nice
if the container were at least not a table.

> > IMO, it would be better to just call the function once and populate
> a
> > couple of typoscript objects with the results; this way, a
> developer can
> > wrap and output one and unset the other one etc...
> > 
> without breaking the current behaviour? Remember lots of extensions
> base
> on the current behaviour!

Oops; heh - I forgot about the installed base...dumb of me.

> I am not talking about a total rewrite of the search and
> browse methods of class.tslib_pibase.php... Thats another topic...
> There
> are a lot of inconsistencies already in how the behaviour of this one
> original method is controlled:
> - parameters
> - one plugin-variable ($this->piVars['pointer'])
> - one object-variable ($this->pi_alwaysPrev)
> - some more via an object-array ($this->internal[])
> which also should be cleared out when rewriting
> But I think your suggestion sounds like a good idea for an
> alternative method, even though I'm not quite sure I understood you
> right:
> 
> You mean to introduce a new TS-Object-Type similar to HMENU or the
> like?
> Again sounds tempting good, but how? I have to admit I don't know,
> this
> goes beyond of what I digged into the core sources yet... (if you can
> point out a good example how this has to be done, I might give it a
> try...)
> 

Well, there are two ways to go about this; the first is just to
populate a marker each with the contents of $showResultCount and $links
(and presumably provide a bit in TS to turn the behaviour on or - by
default - off). I've done an admittedly crude version of this in an
extension by making the function's output conditional on the presence
of an html template (using Kasper's method from the video docs); in the
template file, there are two markers ###BROWSE_LINKS### and
###BROWSE_COUNT### that can be positioned or wrapped (and repeated) as
needed in the html template. It's crude since $links just contains a
string of links with no other markup involved (or possible to add) at
all. So the markup in my working solution is also less than ideal. I
was going to start working on a wrap solution for the individual links
when I thought "wouldn't it be nice to be able to do this with a
TMENU?"

Which brings me to the other method which I recently started attempting
but so far haven't successfully built. You CAN make the output into an
HMENU object. If you check the 'userdefined' and 'browse' properties of
HMENU [1], you can see that it should be possible to get a TMENU object
out of the function.

I think this would be the ideal solution, since it then wouldn't be
necessary to keep re-inventing a set of behaviours already well
developed elsewhere in the system (this behaviour could also be
switched on using TS...)


-Christopher

[1] http://typo3.org/documentation/document-library/doc_core_tsref/HMENU-1/


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 




More information about the TYPO3-dev mailing list