Have reviewed all the documentation I can find and various searches on Drupal. Can't find the answer to my question.

I'm trying to print an icon/link to a users LinkedIn profile (utilizing LinkedIn widgets). Using Content Profile I have various fields elements for users, one being the name of their profile on linkedIn. (Have simialr fields for Facebook, MySpace).

For LinkedIn I need to output the following HTML, where field_user_linked_profileid is the field element in my user profile node:

< a class="linkedin-profileinsider-popup" href="http://www.linkedin.com/in/[field_user_linkedin_profileid_value]">< /a >

I thought I could use a Pane and custom content. Set filter to Full HTML. However, I can't find a way to allow the field substitution to substitute my field. Suggestions? How do I make my field substitutable?

I also wondered if I could specify a special formatter for the field. Specify the field as a regular element, but the formats available are default, trim, plain text.

Using custom content I also tried to use the PHP. But was unable to obtain access to the field. The field is in a user profile (node via content profile module). Is the element(s) being rendered in a variable(s) I have access to via PHP in custom content?

My present workaround is using a View block. While this works, I wanted to try and avoid the extra access to the database.

Also, I am not a PHP programmer, but can dabble. And I am relatively new to Drupal. My apologise in advance if I've missed the obvious. Thanks for your help.

I am using Drupal 6.14 and CCK 6.x-2.6, Content Profile 6.x-1.0-beta4

Comments

merlinofchaos’s picture

Yeah, what you're doing can be kind of difficult, because it has to figure out where to get the UID from, and I see you're kind of grasping at straws hoping the field will be available when you need it, but alas it is not.

If the user you need is available via context, possibly the easiest thing would be to do this: Use the 'relationships' to create a content profile relationship. Then, on the content page, add a 'node content' pane. The trick here is that if you use the panel identifier, you can force it to use a different template than node.tpl.php -- for example, set your identifier to 'linked-in' to get node-linked-in.tpl.php

Then, you can copy node.tpl.php to node-linked-in.tpl.php and trim it down so that it JUST prints what you need. You'll have $node completely available to use.

merlinofchaos’s picture

Status: Active » Fixed

Hopefully this is enough for you to fix this issue.

arsenalpilgrim’s picture

Thanks, I will give it a try. And let you know how it turns out. Do I close this "issue" or do you close it? Appreciate the prompt the response.

merlinofchaos’s picture

The issue will auto-close after 2 weeks. YOu can close it if you like, but there is no need to.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.