Content Query Webpart -- Display part of the Page Content field

Hi,
I am using the following to display the first 200 characters of the Page Content field. However, when the Webpart is loaded, it displays not only the Content, but also the html (please notice that this has a html field type)
Code:
<div class="description">
  <xsl:value-of select="substring(@PublishingPageContent, 0, 200)" disable-output-escaping="yes"/>
</div>
In the Browser, the content looks like:
<span id="ms-rterangepaste-start"></span><div>Test</div><span id="ms-rterangepaste-end">Page Content</span>
As oppose to just :
Test
Page Content
Is there something missing from the code? Please advice, your help would be greatly appreciated.

Hi,
If you writing the content within the Richtext filed you may not this kind of issue.
Thanks,
Vivek
Please vote or mark your question answered, if my reply helps you

Similar Messages

  • Error When inserting Content Query Web part onto the page

    i am using share point 2010 and when i am trying to insert content query web part onto the page i am getting the following error
    i checked the correlation id in the logs file but could not find anything useful in it.
    please suggest why this problem occuring everytime when i try to insert content query webpart onto the page

    Hi,
    Check the correlation id in your logging files are the best way to investigate.
    Did you check these files with "SharePoint ULS Log viewer". Maybe, that will be more easy for you to get the correlation Id.
    Moreover, check the account's permissions with which you try to insert your webpart.
    Regards.
    Gilles Martinez
    Twitter
    Blog
    Please mark as helpful/answer if this resolved your post

  • Content query webpart use a part of the URL as filter

    Hey,
    I have on root site in the site collection a list. Now I like to build up a site template (from which the user can create sub sites form the root site in the site collection.
    In this site template I like to bring on the homepage a content query webpart. The content query webpart has to show one item from the list on the start site.
    How can I configure that the content query webpart use a part of the URL as filter?
    Url is like:
    http://Server/SiteCollection/ID/home.aspx
    The ID must be the filter criterion in the content query webpart. How can I do this?
    Thanks for your help
    Stefan
    Viele Grüße Stefan
    Kontakt unter [email protected]

    Hi Stefan,
    You can create your own CQWP by subclassing the default one.
    Then you can override the CAML query to add criteria found in the URL.
    Here is more information and sample:
    http://www.andrewconnell.com/blog/archive/2008/02/18/Subclassing-the-Content-Query-Web-Part-Adding-Dynamic-Filtering.aspx
    http://msmvps.com/blogs/laflour/archive/2008/05/29/subclassing-content-query-web-part-to-override-caml-query.aspx
    Regards,
    Ludovic Caffin

  • Content Query Webpart not getting displayed in Mobile view

    Hi,
    I am having a Content Query Webpart in my page.
    In the mobile view it is not getting displayed.
    I read that you can create mobile adapters for the control. But I didnt get how to do it for Content Query Webpart.
    Any help appreciated..

    Is deactivate "Mobile view" a option for you? if then then CQWP will work in same page. You can deactivate that feature from site feature.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • In content query webpart columns are not displaying after clicking on edit webpart.

    Hi,
    I created a content query webpart. I added one custom item style in ItemStyle.xsl. This template having some date operations. Some date comparisons. The issue is, template containing some variables but after selecting my template it is not showing the variable
    names to enter the list column. What will be the issue? Below is the code..
    <xsl:template name="BirthdayList" match="Row[@Style='BirthdayList']" mode="itemstyle">
        <xsl:variable name="SafeImageUrl">
            <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
                <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@Title"/>
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>  
    <xsl:variable name="EmployeeDesignation">
            <xsl:value-of select="@EmployeeDesignation" />
        </xsl:variable>
        <xsl:variable name="Birthday">
            <xsl:value-of select="@Birthday" />
        </xsl:variable>
        <xsl:variable name="dateTimeBirthday" select="ddwrt:FormatDate(string($Birthday), 1033, 3)" />     
                    <xsl:variable name="dateOfBirthday"  select="substring-before(substring-after($dateTimeBirthday, ', '), ', ')"
    />
                    <xsl:variable name="monthOfBirthday" select="substring-before($dateOfBirthday, ' ')" />
                    <xsl:variable name="yearOfBirthday"   select="substring-after(substring-after($dateTimeBirthday, ', '), ',
    ')" />
                    <xsl:variable name="TodaysDateOfBirthday">
                        <xsl:value-of select="ddwrt:FormatDate(string(ddwrt:Today()), 1033,3)"/>
                    </xsl:variable>
                    <xsl:variable name="TodaysDateOfBirthdayyy"  select="substring-before(substring-after($TodaysDateOfBirthday, ',
    '), ', ')" />
                    <xsl:variable name="TodaysmonthOfBirthday" select="substring-before($TodaysDateOfBirthdayyy, ' ')" />
                    <xsl:variable name="TodaysyearOfBirthday"   select="substring-after(substring-after($TodaysDateOfBirthday,
    ', '), ', ')" />
                     <xsl:if test="($dateOfBirthday)=($TodaysDateOfBirthdayyy)">
                     <xsl:if test="($monthOfBirthday)=($TodaysmonthOfBirthday)">
         <div>
            <div>       
        </div> 
        </div> 
        <table width="100%"> 
        <tr width="100%">
                    <td width="80%">
                                    <table>
    <tr>
     <td><b><xsl:value-of select="$DisplayTitle"/></b></td>
                       </tr>
    <tr>
    <td>  <xsl:value-of select="$EmployeeDesignation"/>
    </td>
                       </tr>
                                    </table>
                    </td>
                    <td width="20%">
                                    <table>                                               
    <tr>                      
    <td valign="top">
       <img width="60" height="60" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" title="{@ImageUrlAltText}" />                                                  
     </td>       
                                    </tr>
                                    </table>
                    </td>
       </tr>
        </table>
    </xsl:if>
           </xsl:if> 
    </xsl:template>

    Hi,
    Based on your example above, which columns / variables are not appearing when editing the CQWP that you want to bind managed properties / list columns to?
    Eric Overfield - PixelMill -
    ericoverfield.com -
    @EricOverfield

  • Using Content Query webpart for specific Document library with multiple managed metadata - Document with multiple metadata tags not showing up

    Hi,
    I am having an issue where when I insert a Content Query webpart into a page, and filter to managed metadata, all the right documents show up except one document that happens to have two metadata tags attached to it.  The content query webpart is set
    to only look through a specific document library.  I'm not sure what I am doing wrong.
    Here is the one document with two metadata tags:
    Below is the Content Query:

    Hi,
    As I understand, you did not get the results with multiple metadata tags through Content Query web part in SharePoint 2013.
    Check things below:
    1. Check if you have set the item limit more than the display items in Presentation section of the web part. If the item number more than item limit, the rest items will not show.
    2. Check if the item you cannot find uses the content type you have set in the content type section of content query web part.
    When you edit the properties of the item, you will see the content type the item is using.
    Best regards
    Sara Fan
    TechNet Community Support

  • Content Query Webpart For Slider

    I'm trying to create a simple jquery slider with the help of Content Query Webpart in sharepoint 2013. Can anyone help me on this with a simple video or example like how I can achieve this.

    Hi Sreejith,
    To display the search results as a slider in Content Query web part(CQWP), we can upload the
    JQuery plugin to SharePoint and create a Custom ContentQueryMain.xsl and ItemStyle.xsl to render the results.
    Here are some examples about the detailed steps for integrating a Slider with the Content Query Web Part in the links below for your reference(same for SharePoint 2013):
    http://www.nothingbutsharepoint.com/2012/06/18/sharepoint-integrate-a-slider-with-the-content-query-web-part-part-1-what-does-my-slider-need-to-work-aspx/
    http://www.nothingbutsharepoint.com/2012/07/10/sharepoint-integrating-a-slider-with-the-content-query-web-part-part-2-setting-up-my-content-source-aspx/
    http://www.nothingbutsharepoint.com/2012/08/27/sharepoint-integrate-a-slider-with-the-content-query-web-part-part-3-integration-with-the-cqwp-aspx/
    https://www.pena.id/2014/08/adding-slider-sharepoint-using-content-query-web-part-cqwp/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Custom Column Name in Webpart file and Itemstyle for Content Query WebPart

    I was trying to incorporate  a custom column in the content Query WebPart.
    The name of the column displayed in the list is "Risk Score"; a calculated column.
    I right clicked on the field in the list settings and copy hte short cut which is pasted below:
    http://<mainURL>/_layouts/FldEdit.aspx?List=%7BFE4CC761%2DE9B8%2D487C%2D8B92%2D1E42539144C4%7D&Field=Risk%5Fx0020%5FScore
    Could you please let me know what can i type in the WebPart file exported and then to be imported in the section:
    <property name="CommonViewFields" type="string"></property>
    Also, please let me know what should i enter in the itemstyle.xsl in the section
    <td style="width:30%; font-size:10px;font-family:Verdana;color:#007EB6; border-style:solid; border-width:medium;border-color:#E1E1E1;">
    <xsl:value-of select="@Risk%5Fx0020%5FScore" />
    </td>
    Tnx

    Ok.
    Use like this
    <property name="CommonViewFields" type="string">RiskStrore,Lookup</property>
    and include like this in the itemstyle
    <td >Risk store
         <xsl:value-of select="@RiskStore" />
        </td>

  • How to I print a center footer which includes the word "Page" as part of the Page # of #?

    I want to print out multiple pages when I go to a specific URL and I want to also print a custom center footer which actually prints out the word Page as part of the Page # of #, normally if you choose the specific Page # of # you only get printed out as an example 1 of 2, it does not cause the word Page to be included in the printout?
    a

    Hi Nes,
    This is the second time you are posting a variation on this question.
    I was about to so NO YOU CAN'T...
    but then I thought...
    It is possible to print just parts of a front panel but it is a lot easier to do the things others have suggested.
    If you really want to print just a part of the FP you will have to do a lot of coding and the GUI will do some strange things in the process.
    I will outline the process and leave the code as an exercise for the reader.
    Using property nodes determine where on the FP the objects of interest are located.
    Again using property nodes, move the objects around on the FP so that they are grouped together and sized such they fit on a printed page.
    Using property nodes adjust the screen size origin etc so only
    the objects of interest are now visable.
    Using.....nodes print only the visable part of the screen.
    Using....nodes put everything back where is was when you started!
    Like I said, this is not easy.
    The simplest solution was suggested by BJD who said group the objects of interest on a tab page, use an invoke node to get the image and then display it on the FP of a sub-VI set to print on completion. That method will let you quickly add new interesting objects to the print out without having to change the sub-VI.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • The main part of the safari page is grey and won't respond/can't type in any commands.  I can move back through the previous pages, and even open new ones via the URL, but can't get onto the main part of the page and I can't get onto the 9 page option. !?

    The main part of the safari page is grey and won't respond/can't type in any commands.  I can move back through the previous pages, and even open new ones via the URL, but can't get onto the main part of the page and I can't get onto the 9 page option. !?
    Help, please.

    Try clearing Safari's cache : Settings > Safari > Clear Cache (and Clear History)
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Opening iTunes from Windows XP desktop - can only see part of the page

    I have installed and uninstalled the latest iTunes on my Toshiba laptop with Windows XP with a webshots wallpaper. Only part of the page comes up. Can anyone help me with why only part of the page comes up. I'm very frustrated.

    Open the Control Panel, click on Displays, and change the monitor's resolution to at least 1024 by 768.
    (37316)

  • Content editor webpart- unable to see the list data if given the url in the content link?

    HI,
    In content editor webpart,unable to see the list data
    when try to give the list url in the content link?
    please help on the above issue.
    and also want to see the styles to the list.
    how to add the styles to the list row by row.

    Hi sudhir,
    If you click the ellipsis beside the content link, it will pop up a window for you to input the file link. No list option will be offered to be chose.
    When I add a content editor web part to a list, I usually save the code into a Notepad file and save it to a document library. Then copy the url of the document and then paste it into content link.
    Also, you could click Edit HTML Source, then directly add code into the popup window. It works as the same as the above method.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Content Query Webpart show blog post with no of comments

    Hi to All,
    I want to show blog posts using content query webpart along with no of comments to that post
    but comment column in the Posts list is lookup column so how to show no of comments using content query webpart.
    Please help me.
    Thanks,
    Rohit Warghade...

    I am not sure why, but I am getting
    The site or list column "# Comments" does not exist or is not valid.
    What could I be doing wrong?
    Thanks!

  • How can I print just a part of the page and not the full page with Adobe Reader v 10.1.2?

    how can I print just a part of the page and not the full page with Adobe Reader v 10.1.2? I need to print a engineering print with lot of information but information is too small in letter size and I don't have a plotter.

    Two ways to print a portion of a page: zooming or using the Snapshot Tool.
    ZOOMING:
    Zoom into the area you want to print.
    Click the Print icon.
    Under "Pages to Print", make sure "Current view" is selected under "More options" (you may need to click "More options" to open it).
    If you aren't satisfied with the preview, try clicking "Fit" under the Size button.
    SNAPSHOT
    Choose Edit > Take A Snapshot.
    Drag a rectangle around the area you want to print. 
    Click the Print icon.
    Under "Pages to Print", make sure that "Selected Graphic" is selected under "More options".
    To enlarge the snapshot to fit the sheet of paper, choose "Fit" under the Size button.
    Hope this helps!

  • In Pages, how can I make one page have one column on part of the page and two columns on part of the page?

    What I am trying to achieve is a page with one column for all the text I write, but I also want to show two tables (one placed beside the other, not underneath the other) so on the part of the page where I am showing these tables, I would like to have two columns. Is this possible? Underneath the tables, there is more text that should be in one column only.

    Use a layout break.

Maybe you are looking for

  • How to capture date and userdi in the alert mail

    Hi,   In the alert mail I want to capture the userid, date and time. In the container I can define these variables but I was unable to caputre the values. Iam not using any BPM scenario. Can any body help me in this regard how to capture these values

  • Different field mode(display/change) in sales order payment terms (VA02)

    Hello All, In the VA02 transaction, when we are changing the sales orders, in the billing document of that material shows different modes for different fields. VA02->DOUBLE CLICK ON THE MATERIAL->BILLING DOCUMENT->FIELD PAYMENT TERMS. For some orders

  • EDGE automatically connects and i don't know why.

    I've just seen my data usage on my carrier webpage and i've discovered that EDGE automatically connects even if i don't use any internet-required application (maps, safari ecc.) I just would like to know....why? Why should EDGE be always activated? I

  • Saved pdf file does not include filled in text

    i am using adobe acrobat pro; trail version.  I can fill in a fillable pdf file but after saving the file and then emailing the filethe received email attachment does not include my text included in the pdf form?

  • How does one create age restricted articles inside DPS?

    Hello all, I need to know how to create an article that is age restricted. Are there any setting within InDesign etc. that can do this, or shall I use HTML in a web overlay? Thoughts or example etc., greatly received and much appreciated. Cheers, Bil