TOPIC:

Link in Item Wrap Code 1 year 6 months ago #244446

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 411
  • Thanks: 0
How would I put a link in an item wrap code that links to another list view item details that would correspond to an ID that matches the view, here is what I came up with but it doesnt work
<? php $LinkID='col448'; <a href=”http://index.php/league-list/details/1/$LinkID/{value}?layout=listone&start=0”>{value}</a>?>

$LinkID = League ID
{value} is the league name

I hope I have explained this ok

Please Log in or Create an account to join the conversation.

Link in Item Wrap Code 1 year 6 months ago #244449

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 8311
  • Karma: 3
  • Thanks: 575
Hi,

please try something like this:
<?php $LinkID='col448';  return $value='<a href="http://YourDomain/ViewName/details/ViewId/RecordId/">'.$value.'</a>';?>
Please replace:
-YourDomain with your domain,
-ViewName with name of the view,
-ViewId with the id of the view,
-RecordId with the id of the record where the user should be redirected to

Let me know if it helps.

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Link in Item Wrap Code 1 year 6 months ago #244459

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 411
  • Thanks: 0
Hi

No sorry this doesnt work.
The RecordID needs to change to match col448 (recordID) and the value of this record is what is used for the last part ie.

crosstec-league?layout=listone&start=0

Please Log in or Create an account to join the conversation.

Link in Item Wrap Code 1 year 6 months ago #244612

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Hi,

you can determine the column ID you need to address by right clicking on the table columns header and inspecting the html source. You shoudl see something like colXXX and use this instead of col448 if it doesn't match.

It's actually not the record id but the element id. Different thing.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Link in Item Wrap Code 1 year 6 months ago #244625

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 411
  • Thanks: 0
Markus, I think you would understand what I am trying to acheive here as you have helped me with other things on my project.
View 1 = League
View 2 = Team
Within view team I have a column which has the league it is linked to, I would like this to link to the view league that corrisponds to 'col1448' which is the 'LeagueID'

Please Log in or Create an account to join the conversation.

Link in Item Wrap Code 1 year 6 months ago #244640

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
hm, please try this then
<?php $value = '<a href="https://domain.com/?LeagueID='.$item['col1448'].'">LINK</a>';

This should return the league id of the current row if "col1448" is actually the league id column.

Regards,
Markus

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!