How to display the Author's Photo in a Display Template

I am creating a custom display template that will show the date and contents of a blog post on the right, with a thumbnail of the author on the left. I cannot figure out how to retrieve the URL for the users photo from the display template.
My first thought was that maybe there was a Managed Property I could choose in the property mappings. The Author Property will give me the Last Name, FirstName of the author. There is also a AuthorOWSUSER, which I thought might be an object with properties
I could reference, like .FirstName, .Picture, etc. But this doesn't appear to work.
My guess is that I have to do some scripting in the display template itself, but I just don't know where to find any references on this.

Hi,
I have done this in a Project before mounth. Create a Blog Post Site an attach with Visual Studio. There is a lib
sp.ui.blogs.debug.js.
When you load a Blog with comments, you can put a breakpoint and step Through.
There is a Function, that renders the Photo from the Author Field.
Hier is my code:
function renderAuthor(ctx, $p1) {
var $v_0 = SP.ScriptHelpers.getFieldFromSchema(ctx.ListSchema, 'Author');
if (!SP.ScriptHelpers.isNullOrUndefined($v_0)) {
var $v_1 = $v_0.WithPictureDetail;
var $v_2 = $v_0.PictureOnly;
$v_0.DefaultRender = 0;
$v_0.WithPictureDetail = 0;
$v_0.PictureOnly = 1;
$v_0.PictureSize = 'Size_48px';
$p1.write(spMgr.RenderFieldByName(ctx, 'Author', ctx.CurrentItem, ctx.ListSchema));
$v_0.WithPictureDetail = $v_1;
$v_0.PictureOnly = $v_2;
It is very important that your Content Type Field has the Attribute ShowField="NameWithPictureAndDetails"
Then you dont need to query UserProfile for Pictures, the info will be in the Fiedl.
Chears
Martin

Similar Messages

  • How to restrict the no of rows to be displayes in ALV in webdynpro

    Hi All,
    Can any one suggest how to restrict the no of records to be displayed in the portal in the ALV through webdynpro ABAP.
    Thanks & Regards,
    Sreelatha Gullapalli.

    HI,
    If you want to change the Source (Design time) then you can do that via the alv configuration.
    Something like this in the component SALV_WD_COLUMNS_UI
    lr_available_model->if_salv_wd_table_settings~set_visible_row_count( lc_row_count ).

  • How to customise the backdrop in photo booth application?

    how to customise the backdrop in photo booth application?

    If you’re using Photo Booth in full screen, move the pointer to the top of the screen, then click the Exit Full Screen button.
    If you’re viewing a photo or a video, click the View Video Preview button.
    Click the Effects button.
    Browse through the backdrops until you reach User Backdrops.
    Drag a photo or video to one of the User Backdrop frames. You can drag a picture or video from your desktop, the Finder, iMovie, iPhoto, or Safari.

  • How much is the cost for replacing iphone 4 display?

    how much is the cost for replacing iphone 4 display?

    Apple will replace it, and the replacement comes with a 90-day warranty.
    There are some legitimate, high quality repair centers that often can fix phones for less than replacement cost and offer at least 90 warranty...
    Or maybe the OP knows that the broken display is not covered under warranty, which is why he was asking for the cost, but he still may have a warranty that just wouldn't cover him in this case.
    The warranty is all or none.  If the phone were damaged so as to void warranty coverage on the display, there is no remaining warranty on the rest of the device.

  • MS Notepad unable to display the Chinese characters I type and display them as squares

    MS Notepad is unable to display the Chinese characters I type and display them as squares. But when I copy those squares on notepad to Wordpad or MS Word, they display the Chinese characters just fine. I've no idea why those Chinese characters I type can't display properly on notepad. I check the font of the notepad and it's the default. I've another Windows Vista desktop computer which has notepad of the similar setting and display Chinese characters just fine. Both are using Chinese (Simplified) - Microsoft Pinyin New Experience Input Style to input those characters. But I don't understand why my Windows 7 is facing this problem.

    Hi,
    Notepad is a very simple text editor BUT it will work if you use the SAME language in Windows. Please try:
    1. go to control panel, click "Clock, Language, and Region"
    2. click "Change location" under the "Region" section
    3. go to the "administrative" tab, then click "change system locale...", then select "Chinese".
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to use the AUTHORITY-CHECK in ABAP

    I am a security guy but am trying to understand how the AUTHORITY-CHECK works. I have read the help on it but it doesn't answer to my understanding. I want a check in a report so that no matter what the user selects the program goes out and checks the authorization in the users master record and only displays what he has access to. I am sure this is basic but I am not a programmer.
    Thanks

    Hi Greg,
      Basically a AUTHORITY-CHECK is a programmatic way to check a auth object a user has.  This is only as good as the person writing the code makes is.
    Here is a basic example of how it could work.  Lets say you have auth objects for users that limit them to see company code. User A can see cc 10, User B can see cc 20 and user C can see both.
    In the code the programmer would have to first do the authcheck to see what CC the user has access to.  Then they would have to limit his reporting based on the results of the authority check.  So they might do it by saying SELECT * FROM XYZTAB WHERE COMPANY CODE = AUTHCC
    This is what I think you are looking for.  There are other ways to use the auth check.  You can do a check and end the program with a message if they don't have authorization. 
    If you need more info, let me know
    John

  • Z10 - How to make the built in Photo app see photos on the SD Ram

    Hi,
    Was using my Z10 for recording video when it reported memory problems.. No problem. I baught it a 64 GIG SD ram to address any memory problems.. Perfect, all photos and videos now go to the SD ram.. BUT.....
    Neither the photos nor the videos appear in the lists of content in either the built in Photo application nor the Videos application. To see them I have to go to File Manager and view files stored on the SD ram were they have been recorded as expected and can be seen. Often when you go to see a video or picture in the File Manager to view a photo or video, no thumbnail of the photo is present! instead you get a generic icon that the file is a photo and you have to open it to see what photo or video it is. It isn't until some time after the thumbnails are properly updated. It also puts both photos and videos in the Camera folder on the SD ram instead of the associated folders on the SD.
    I was at the telus store while 2 telus reps struggling to find any way to get the photo app or the video app to display the SD ram content. They commented that Blackberry indicates it supports up to 32gig in SD ram but the fact that it is recording and retrieving properly indicates 64 gigs works too at least for this purpose.
    The Question: How does one tell the Photo and Video app to display camera data on the SD ram?
    Thanks,
    The Manx

    I've had issues with the 64gb cards also, one worked and another did exactly as you described.
    Some users have had to format the 64gb card to FAT32 to make it work.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to switch the Isight webcam with 3 LED displays connected to my MacPro

    I have got three LED Apple displays connected to my MACPro. Now the Isight webcam is activated in the right Led display. I don't know how to activate the middle Isight webcam en de-activate the Isight webcam of my right Led display.

    Welcome to Discussions, WimNL
    WimNL wrote:
    I have got three LED Apple displays connected to my MACPro. Now the Isight webcam is activated in the right Led display. I don't know how to activate the middle Isight webcam en de-activate the Isight webcam of my right Led display.
    How you select among connected cameras depends on which application you are using to operate your iSight. Here is how camera selection works in a few examples:
    (1) For iChat, you can choose which iSight you use in the "Camera:" choices bar in iChat > Preferences... > Audio/Video that appears when more than one compatible camera is connected. Although your camera choices will be different, the choices bar will look something similar to the Preferences settings shown here:
    If you cannot see the "Camera" choices bar, your Mac is recognizing only one (or none) of your iSights. In that case, consider the suggestions from http://support.apple.com/kb/HT2090
    This particular choices bar solution applies ONLY to iChat. Most other applications also have settings that allow you to choose which camera to use. However, they do not all work the same way.
    (2) For instance, iMovie HD's camera choice is NOT set via Preferences. When you have more than one compatible camera connected, iMovie uses a drop-down menu choice something like this (depending on which version of iMovie you use):
    Note: Because I had no built-in iSight connected when I made this example, and because my external iSight was not connected, the drop-down menu showed only "Time Lapse." Because your Mac has a built-in iSight, your built-in iSight would show in the drop-down menu even when no other camera is connected. Connecting an additional Mac compatible webcam should allow you to choose either camera.
    iMove 9 (from iLife '11) uses a different camera choice button shown in this article:
      http://docs.info.apple.com/article.html?path=iMovie/9.0/en/mov39f84285.html
    iMove 8 (from iLife '09) is slightly different as explained in this article:
      http://docs.info.apple.com/article.html?path=iMovie/8.0/en/10172.html
    In general, you can use your Mac's help for the application in use to find out how to select among more than one connected camera.
    (3) Photo Booth in Snow Leopard 10.6.x uses the Photo Booth > Camera menu command to select which camera to use.
    Note for readers with older Mac OS X: The previous version of Photo Booth that came with Tiger (10.4.x) is such a simple, basic app that it offers no menu selectable choice. Unless your built-in iSight is already occupied as the camera being used by some open application before you launch Photo Booth, Photo Booth will use ONLY your built-in iSight.
    However, you can use the trick from ¶ 4 of http://docs.info.apple.com/article.html?artnum=302781 to let Photo Booth use an external camera.
    (If you have an external Firewire camera connected, it may be used in preference to any USB webcam. If that is a problem for you, merely disconnect the problem Firewire device.)
    (4) For FaceTime, launch the app and click the Video menu item.
    If your Mac recognizes more than one connected compatible camera, a "Camera" section listing the cameras from which you can choose will appear there. Clicking on the desired camera name will let you select the one you want as shown in this image from my Mac Pro and LED Cinema Display:
    If your Mac recognizes only one compatible camera, the "Camera" section will not appear in the Video menu, but FaceTime will automatically use the connected camera that is recognized by OS X.
    (5) For other apps, see Help for each app for info on how to select your desired camera.
    EZ Jim
    Mac Pro Quad Core (Early 2009) 2.93Ghz Mac OS X (10.6.6); MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.6)
    LED Cinema Display; G4 PowerBook 1.67GHz (10.4.11); iBookSE 366MHz (10.3.9); External iSight; iPod4touch4.2.1

  • How to increase the number of rows to be displayed in BEx Web Analyzer

    hi,
    I am viewing reports using BEx Web analyzer option. It is displaying only 24 rows  of data at a time. How to increase the number of rows? do i need to any kind of settings?
    pls reply.

    Hi,
    I think the standard template in 2004s is named 0ANALYSIS_PATTERN. You can find it in Web Application Designer, open, and search for the technical name. If you want to change the number of rows or columns, you can find this setting near the bottom of the XHTML view of the template:
    <bi:BLOCK_COLUMNS_SIZE value="4" />
    <bi:BLOCK_ROWS_SIZE value="17" />
    Then just save, and ignore the error messages.
    Message was edited by:
            vind Reinsberg

  • How to display the error message on screen in display mode

    Hi all,
    How to display error message as as status message on the screen(module pool).
    The requirement is if I call the screen, it should get with the error message in the status bar. If I write with error message 'E' error mesage information displays and when I click on exit, it lives the current transaction.
    Thank you!
    Prasad

    Hi,
    Try as below.
    MESSAGE IXXX DISPLAY LIKE 'E'.
    LEAVE TO SCREEN XXXX.
    After displaying the information message like E, leave to the screen you want to navigate or can also navigate to the transaction required.
    Regards,
    Nangunoori.

  • How to Edit the CheckBox in Classic ALV GRID Display

    Hi,
    I want to Edit the checkbox in Grid Display.
    I have one checkbox field in my internal Table,
    Code Of the Program,
    Data :
    Begin of itab occurs 0,
    CHK type C,
    MATNR like MARA-MATNR,
    end of itab.
    Iam building the fieldcatelog using Merge Funcion module.
    After that I am chaning the properties of the field
    catelog like below,
    loop at I_FCAT assigning <FCAT>.
    Case <FCAT>-Fieldname
    When 'CHK'.
    <FCAT>-Checkbox = 'X'.
    <FCAT>-INPUT = 'X'.
    I dont have edit option in fieldcatelog.
    modify I_FCAT from <FCAT>.
    endcase.
    endloop.
    In the Layout,
    I_LAYOUT-box_fieldname = 'CHK'.
    I_LAYOUT-box_tabname = 'ITAB'.
    It is displaying the Checkbox field.but I couldnt edit the checkBox.
    I can able to edit in REUSE_ALV_LIST_DISPLAY.
    But I  have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
    Thanks in Advance,
    Sumithra

    Hi vasu,
    The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
    The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
    •     Add another field to the output table in which you want to display checkboxes
    OR
    •     Define an existing field as a checkbox.
    Procedure
    1.     Add a field to your output table:
    Data: gt_fieldcat type lvc_t_fcat.
    Types: begin of gs_outtab.
    Types: checkbox type c. "field for checkbox
    Include structure <ABAP Dictionary structure> .
    Types: end of gs_outtab.
    Data: gt_outtab type gs_outtab occurs 0 with header line.
    2 * Add an entry for the checkbox to the field catalog
    clear ls_fcat.
    ls_fcat-fieldname = 'CHECKBOX'.
    * Essential: declare field as checkbox and
    * mark it as editable field:
    ls_fcat-checkbox = 'X'.
    ls_fcat-edit = 'X'.
    * do not forget to provide texts for this extra field
    ls_fcat-coltext = text-f01.
    ls_fcat-tooltip = text-f02.
    ls_fcat-seltext = text-f03.
    append ls_fcat to gt_fieldcat.
    regards,
    venu.

  • How to get the backup of photos from  i cloud id ?

    plz provide me the answers as soon as possible.

    BALAJI_PRASANNA wrote:
    Hello,
    I am very new to Labview. Í have an image of an LED and wanted to find the luminance value. I got the luminance image from the IMAQ ExtractSingleColorPlane but the value is not displaying. I just wanted to know how to get the value of luminance from the IMAQ ExtractSingleColorPlane. I have attached what i have done below.
    Thanks in advance.
    Before learning about LabVIEW, learn about images.  An Image (in LabVIEW) is a "representation of an image", that is, the wire itself doesn't really have a "value", but "points to" a collection of data that can be "imaged" (i.e. looked at as through it were a picture), "manipulated" (for example, extracting a color plane, basically getting the "red channel", an image looking as through it were viewed through a red filter), and possibly returning arrays of numbers representing the intensity of the light at a certain position in the picture.  
    BS

  • How to place the date in photos

    How can you place the date in photos as they are taken?

    Hi,
    You can pass the image url as a href attribute=> file:///Users/me/Documents/my_pic.jpg directly within your xml. It just needs that you pass a local, static and valid url.
    If you want to add image later once the xml is flowed and so target specific nodes and inject images, it's a bit more complex. If the node is not part of the layout, you may try to reach the XMLElement objet and such an attribute, then layout the element.
    var x = some XMLElement
    x.xmlAttributes.add("href","file:///Users/m/Documents/my_pic.jpg" );
    If already placed, then you have to get the associated pageItem, then place your file into it.
    pagItm.place ( File ( "/Users/m/Documents/my_pic.jpg" ) );
    Hope that helps,
    Loic
    http://www.loicaigon.com

  • How to Change the Fields from Input mode to display mode

    Hi experts,
    Here is my business requirement. I need to show certain fields in the PRICING TAB OF SALES ORDER  in display mode. Now for this i am using the BADI definition CRM_PRICING_BADI.
       Now, can anybody tell me how to change the field type from input mode to change mode?

    Hi Karan,
      In your BADI has a parameter CT_INPUT_FIELD_NAMES with one field called CHANGEABLE with values:
         Field Can Be Changed
    A     Field Cannot Be Changed
       Assing this values to your fields according with your requirements.
    Regards.
    Manuel

  • How to limit the number of characters a label displays?

    Can someone please tell me how I can limit the number of characters a label displays from the text property?

    Ok. What I am trying to do is display a number with the format
    x.yy
    I need the display to show all characters all the time.  For example let me show you what I currently get and what I require.
    Current     Require
    0               0.00
    0.1            0.10
    etc
    To me its like the label is truncating the number appropriately and I dont want it to do that.  I need a fixed 4 character format.
    Hope this clears it up.

Maybe you are looking for

  • How do I get my iphone to download it's playlist to itunes on my new computer

    How do I get my iphone to download it's playlists to itunes on my new computer. Once I unplug my phone I can't see the playlists on the device.---The device no longer shows and I can't copy my phone playlist to new playlist on itunes

  • HP DV6 2030 SD recovery failure

    Hello I have a nearly three year old HP DV6 2030 SD and for several reasons I wanted to reinstall all software. Directly after buying (december 2009)  I made the three rescue DVD's and a system recovery DVD, and just to check, I then reinstalled the

  • Instantiation error with custom filter implementation

    have implemented the custom filter in oracle UCM 11. component is created via component wizard and it's succesfully deployed and enabled in content server. filter is being associated with event validateStandard. when we check-in a file, check-in is f

  • BT Mail / Google Chrome Problem

    Since Monday of this week, if I leave a message open and select my inbox to look at other messages, I am automatically logged out. BT tells me this is an issue with Chrome, and indeed I don't have the same problem with Internet Explorer. Has anybody

  • Is it possible to Migrate Live VMs from a Windows 2012 Hyper-V Cluster to a different 2012 R2 Cluster?

    At the moment I'm in a bit of dilemma because I know that Windows 2012 supports "Shared Nothing Live Migration" but recently I got to know that this feature is available for stand alone Hyper-V Servers. My Setup is that I have 3 Servers running Windo