XF 2.1 The second parameter of the link function in the templates - values are not substituted

NikitOS

Well-known member
Hi!

I have a routing:
1584199010695.webp

To create a link here, I use the link function in the templates: {{ link('mv-sbi/pg', $pgData) }}

The $pgData variable contains the result \XF::finder('MV\SBI:Pg')->where('name', $userId)->fetchOne();

As I understand it, the bid parameter should be added to the routing /mv-sbi/pg, which is taken from $pgData, but this does not happen and at the output I get the link /mv-sbi/pg

What am I doing wrong?
 
The mistake was very stupid - the slash at the end of the sub-name is not needed :)
Yes, that slash at the end had caused me problems numerous times. I had to trial and error and waste a lot of time because of it.

Would it nice if someone sheds some light on it - when to use it and when can it be skipped.
 
Top Bottom