[TYPO3] Re: [Typo3] rollover on gifbuilder objects possible? (not gmenu)
Timo Wiersch
wiersch at visor3000.com
Wed May 17 12:41:51 CEST 2006
Hello,
even if it's quite a bit, when this thread was opened...
Well this little piece of code would work prefect for me, if i was able
to implement it into a GMENU...
if i write something like this:
NO.noLink = 1
there is no way (at least i haven't found any) to put a different
typolink to it, so that typo3 is always linking to a page with the uid
from the current item of the userFunc.table or not linking at all
(whether i'm using noLink or not)
Any suggestions?
timmo
Peter Klein wrote:
> Hi Rafael, here's a codesnippet that allows you to use other tables than
> 'pages' to render menus.
> What it does is adding a TS "select" property to the userFunc.. More info on
> "select" can be found in TSRef.
> http://typo3.org/documentation/document-library/doc_core_tsref/select/
>
> Create a file in your "fileadmin" folder, and name it "menuFunc.inc"
> then fill the file with this content:
> -- cut --
> <?php
> class user_menuFunc {
> function makeMenuArray($content,$conf) {
> $menuArr = array();
> $lConf = $conf["userFunc."];
> $res = $this->cObj->exec_getQuery($lConf["table"],$lConf["select."]);
> if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
> $GLOBALS['TT']->setTSlogMessage($error,3);
> } else {
> $GLOBALS['TT']->setTSlogMessage('NUMROWS:
> '.$GLOBALS['TYPO3_DB']->sql_num_rows($res));
> while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
> $menuArr[] = $row;
> }
> }
> return $menuArr;
> }
> }
> ?>
> -- cut --
>
> And here's a simple example using the function to create a list of
> tt_address records in a standard TMENU. (Which could also have been a GMENU)
>
> -- cut --
> page.includeLibs.usermenu = fileadmin/menuFunc.inc
>
> lib.usermenu = HMENU
> lib.usermenu.special = userfunction
> lib.usermenu.special.userFunc = user_menuFunc->makeMenuArray
> lib.usermenu.special.userFunc.table = tt_addess
> lib.usermenu.special.userFunc.select.pidInList = 4
> lib.usermenu.1 = TMENU
> lib.usermenu.1 {
> NO {
> doNotLinkIt = 1
> stdWrap.field = user
> # Remove the # from the next line if you want to see which fields are
> available!
> #stdWrap.data = debug:data
> typolink.parameter.field = www
> allWrap = <br>
> }
> }
> -- cut --
>
> BTW: Remember to change the "select" statement in the line:
>
> lib.usermenu.special.userFunc.select.pidInList = 4
>
> to point to the sysfolder where your tt_address records are located..
>
> ---
> Peter Klein /Umloud Untd.
>
> ""Rafael Schär [beYou media]"" <typo3 at beyoumedia.com> wrote in message
> news:mailman.1.1134925691.20717.typo3-english at lists.netfielders.de...
>> hi
>>
>> thnx a lot peter, i didn't success with that.
>> I found in this case another way. I did it with opacity because it is a
>> black/ grey menu. (little fakey) :)
>>
>> Anyway thnx a lot
>>
>> Rafael
>>
>> Peter Klein wrote:
>>> Hi Rafael. Gifbuilder has no rollover state, but you could write a small
>>> userfunction for HMENU, to transfer the tt_address records to the
>>> menuarray. Then you can use GMENU to make rollover states..
>>>
>>> There's an example on how to create 'fake menus' at the bottom of this
>>> page..
>>> http://typo3.org/documentation/document-library/doc_core_tsref/HMENU/
>>>
>>> ---
>
>
More information about the TYPO3-english
mailing list