[TYPO3] passing variables to PHP script
Catherine
catepeter at optusnet.com.au
Mon Jul 23 03:02:33 CEST 2007
Jan Bednarik wrote:
> Hey,
>
> $GLOBALS['TYPO3_DB']->exec_SELECTquery('SELECT v1.*, (SELECT
> MIN(uid) FROM tx_drwiki_pages WHERE pid='.$GLOBALS['TSFE']->id.'
> AND keyword=v1.keyword GROUP BY keyword) AS lat','v1,
> tx_drwiki_pages','v1.pid='.$GLOBALS['TSFE']->id,'lat','lat');
>
oh thanks so much for that Jan - nice to see it in black and
white, I toyed with it for so long.
Perhaps you can help with the next part too... before I was
selecting and wrapping keywords like this ...
#Leftside Nav
lib.nav = CONTENT
lib.nav{
table = tx_drwiki_pages
select {
pidInList = this
selectFields = pid, keyword
}
renderObj = TEXT
renderObj {
required=1
# Displays the keyword inside the <li/> tags
field = keyword
# Inner wrap around individual rows
wrap=<li class="leftnav">|</li>
# Wraps the keyword with a link to the correct page
typolink {
# Links to the page that the wiki keyword is found on
parameter.data = field:pid
# Adds the keyword to the query string
additionalParams.wrap = &tx_drwiki_pi1[keyword]=|
additionalParams.data = field:keyword
}
}
# Outer wrap around all rows
wrap = <ul class="leftnav"> | </ul>
}
Now that I am running it through the PHP script, obviously this
needs to change. I think I have identified everything that needs
to happen ... I need to:
1.Select the pid - but does that need to come from the php
script?, or can I simply and seperately select pidInList=this?
(tried, cant get it to work, so thinking it has to come from
script.)
2.Select the returned keywords ... now "lat"? or
dx_drwiki_pages.v1.lat?
3. Wrap them including links.
I am not sure how much my previous ts needs substituting, or if a
complete rewrite is needed. (Have tried a lot of substituting :) -
no success so far.)
All hints gratefully accepted :)
Cate
More information about the TYPO3-english
mailing list