Jump to content

Linking an article to forum post


kevinsuave

Recommended Posts

Posted

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!

Posted

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. 

Posted

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.

 

Posted

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>

 

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...