kevinsuave Posted June 3, 2015 Share 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! Link to comment Share on other sites More sharing options...
opentype Posted June 3, 2015 Share 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. Link to comment Share on other sites More sharing options...
kevinsuave Posted June 3, 2015 Author Share Posted June 3, 2015 Thanks, i'll give that a try. Link to comment Share on other sites More sharing options...
kevinsuave Posted June 3, 2015 Author Share 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. Link to comment Share on other sites More sharing options...
opentype Posted June 3, 2015 Share Posted June 3, 2015 $record->field_XXX Link to comment Share on other sites More sharing options...
kevinsuave Posted June 3, 2015 Author Share Posted June 3, 2015 Like this?{$record->field_player_post} Link to comment Share on other sites More sharing options...
kevinsuave Posted June 3, 2015 Author Share Posted June 3, 2015 Nevermind, got it to work. Thanks @Ralf H.! Link to comment Share on other sites More sharing options...
kevinsuave Posted June 3, 2015 Author Share 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> Link to comment Share on other sites More sharing options...
opentype Posted June 3, 2015 Share 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. Link to comment Share on other sites More sharing options...
kevinsuave Posted June 3, 2015 Author Share Posted June 3, 2015 Great, that worked! Thx again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.