Jump to content
Graphics Submission Contest Read more... ×
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up
Kit the Human

Help IPS and Custom Profile Fields

Recommended Posts

As promised, the how do?! topic.


I'm in the customFieldsDisplay template and am attempting to call the custom profile fields individually with no success. I've tried a few codes...


  <div>Age {$fields['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$author->fields['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$author->field['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$author->contentProfileFields['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$author->contentProfileField['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$fields['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$fields['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$author->fields['core_pfieldgroups_2']['core_pfield_2']|display}</div>
  <div>Age {$author->contentProfileFields['core_pfieldgroups_2']['core_pfield_2']|display}</div>
  <div>Age {$author->contentProfileField['core_pfieldgroups_2']['core_pfield_2']|display}</div>
  <div>Age {$fields['core_pfieldgroups_2']['core_pfield_2']|display}</div>
  <div>Age {$fieldData['core_pfieldgroups_2']['core_pfield_2']|raw}</div>
  <div>Age {$fieldData['core_pfieldgroups_2']['core_pfield_2']|display}</div>

Some of them are doubled up with raw/display just in case that was my issue.


raw display nothing. Display spits out 0, which is probably the same as nothing.


So I figured that since the template is already pointing towards the author's profile, I wouldn't need to refer to it again. However I expect that my resounding failure indicates a flaw in my logic....certainly whatever code I'm trying.


I'm fairly certain I've got the right IDs. Evidence attached.


I await mighty wisdom!



Share this post

Link to post
Share on other sites

Is the answer. You can get the identifiers for the profile group and profile field by hovering over the edit pencil in the ACP. The last number is your hint.


This guide was a great help



Next question @Mousie


The code above spits out what it should, a URL. However, when I wrap it in a link, it adds a lot of junk.



<a href="{$profileFields[core_pfieldgroups_2][core_pfield_4]|raw}"><i class="fa fa-link" aria-hidden="true"></i> Plotter</a>


Spits out:

<a href="
<div class='ipsType_break ipsContained'><a href='http://www.searovers-rp.com/index.php?app=core&amp;module=system&amp;controller=redirect&amp;url=http://www.searovers-rp.com/topic/35-qmls/&amp;key=1a5677d1252a0ac0f993b3ef96bdeb98a423ca7984c3f4e7ee7cd18527020d50&amp;resource=' target='_blank'>http://www.searovers-rp.com/topic/35-qmls/</a></div>"><i class="fa fa-link" aria-hidden="true"></i> Plotter</a>


If I make a variable:

{{$plotter = $profileFields[core_pfieldgroups_2][core_pfield_4];}}
<a href="{$plotter}"><i class="fa fa-link" aria-hidden="true"></i> Plotter</a>


Spits out:

<a href="
&lt;div class=&#039;ipsType_break ipsContained&#039;&gt;&lt;a href=&#039;http://www.searovers-rp.com/index.php?app=core&amp;module=system&amp;controller=redirect&amp;url=http://www.searovers-rp.com/&amp;key=2bc862edad7ace12e5630df0ff1c298b245fdfc68fed3c2e37fbb5fa655f7426&amp;resource=&#039; target=&#039;_blank&#039;&gt;http://www.searovers-rp.com/&lt;/a&gt;&lt;/div&gt;"><i class="fa fa-link" aria-hidden="true"></i> Plotter 2</a>

The variable always spits out all that extra stuff. Directly calling the raw profile field will spit out the correct content, if I don't wrap it in the href attribute.


Anything that isn't a link works perfectly!


Any ideas on what's happening here?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.