[TYPO3] creating a link from home page to a single record in a plugin list

Mike Jones mrt.jones at ntlworld.com
Tue Jan 3 21:48:43 CET 2006


Happy New Year to one and all!

I am struggling with the last bit of a new website.

I have developed a frontend plugin extension which works very well. On the
relevant page the plugin shows either the list view or single view of
properties for sale - this works extremely well.

One of the data items for each new property record is a 'new until' date -
this means I can use code to include a flashing 'NEW' icon alongside the
record in the list - looks fine.

What I want to do is include on the front page of the site a list of
properties that are new and have each item in the list link to the
appropriate page showing the item in single view.

I have a function call which returns an array of records that meet the
criteria - i.e. before the 'new until'  date has passed. I have tried a
number of ways to make this work but the bit that is failing seems to be
that altPageId in link_listSingle does not work as I expect.

Here is the function code:

			$content =
$this->pi_list_linkSingle($linkStr,$row['uid'],$cache=TRUE,$altPageId=$row['
pid']);

where $linkStr is the item in the list, $row['uid'] is the record id in the
database table, $cache=TRUE causes the cHash to be generated and - this is
the key part - $altPageId is set to $row['pid'] which is the page I want to
link to.

The code returns the following:

.../index.php?id=3&user_properties_pi1[showUid]=1&user_properties_pi1[0]=4&c
Hash=e6ab2d2294

user_properties_pi1[showUid]=1 is correct

the 4 in user_properties_pi1[0]=4 should be the first parameter after
index.php - i.e. index.php?id=4 instead of id=3 - in fact I don't know why
this extra parameter has appeared.

the cHash is fine

Can anybody point me in the right direction, please?

With thanks in advance

Best wishes

Mike Jones




More information about the TYPO3-english mailing list