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

Mike Jones mrt.jones at ntlworld.com
Wed Jan 4 18:37:47 CET 2006


Hi Peter

That did it for me!

I suppose I thought that because the parameters are defined in the function
definition, and specifically named, that they could be left out of the call
and the default values would be used. I think there is a script language
that does that - is it VBScript or ASP?

Anyway, thanks for clearing that up for me.

Very best wishes to you

Mike Jones

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de]On Behalf Of Peter
Klein
Sent: 04 January 2006 17:07
To: typo3-english at lists.netfielders.de
Subject: Re: [TYPO3] creating a link from home page to a single record
inaplugin list


Hi Mike. It looks like you are missing some parameters in your call to
"pi_list_linkSingle", as it has the following default parameters (TYPO3
v3.81):

function
pi_list_linkSingle($str,$uid,$cache=FALSE,$mergeArr=array(),$urlOnly=FALSE,$
altPageId=0)

So what you are setting with your "$altPageId" is the "$mergeArr"
parameter..

---
Peter Klein / Umloud Untd

"Mike Jones" <mrt.jones at ntlworld.com> wrote in message
news:mailman.78.1136334370.14983.typo3-english at lists.netfielders.de...
> 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
>


_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




More information about the TYPO3-english mailing list