kevinsuave Posted June 3, 2015 Posted June 3, 2015 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!
opentype Posted June 3, 2015 Posted June 3, 2015 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.
kevinsuave Posted June 3, 2015 Author Posted June 3, 2015 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.
kevinsuave Posted June 3, 2015 Author Posted June 3, 2015 Nevermind, got it to work. Thanks @Ralf H.!
kevinsuave Posted June 3, 2015 Author Posted June 3, 2015 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>
opentype Posted June 3, 2015 Posted June 3, 2015 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.