Posted June 3, 201510 yr I'd like to create a page which shows the records from a certain database. However, when clicking the title of one of these records, I want the user to be directed to a specific forum post instead of the record content. It would be perfect if I could submit that forum post link whilst creating a record, the same way I'd add the title et cetera. Is there a way of doing this?Cheers!
June 3, 201510 yr Community Expert You can easily collect arbitrary links in Pages databases using the URL field. You would then need to change the template and switch out the regular record link with the new link field.
June 3, 201510 yr Author How do I call the content from the field only? By doing the following it includes all kinds of crazy characters:{$record->customFieldDisplayByKey('player_post')} gives me <span class='ipsBadge ipsBadge_style1'>Player forum post: <a href='http://ajaxdaily.com/forums/topic/10-arek-milik/' target='_blank'>http://ajaxdaily.co<wbr>m/forums/topic/10-ar<wbr>ek-milik/</a></span>I just want it to include the url I specified in the field.
June 3, 201510 yr Author Like this?{$record->field_player_post} Edited June 3, 201510 yr by kevinsuave
June 3, 201510 yr Author Sorry, I did not get it to work. This is how I got it right now:<a href="{$record->player_post}" title="{lang="read_more_about" sprintf="$record->_title"}"> {wordbreak="$record->_title"} </a>
June 3, 201510 yr Community Expert What doesn’t work? I guess the link is still messed up?If so, use use the field id like I posted before, e.g. {$record->field_25}That uses the field value directly. You see the field ID in the ACP in the URL when you hover over the edit button of the field. 25 is just an example.
Archived
This topic is now archived and is closed to further replies.