1

I'm trying to customize the fields dislplayed by CQWP and I'm following this article

Displaying Custom Fields in a SharePoint 2013 Content Query Web Part

When I export my CQWP to to add my customized ItemStyle I don't have the ItemXslLink property.

This is my web part:

<webParts>
  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
    <metaData>
      <type name="Microsoft.Office.Server.Search.WebControls.ContentBySearchWebPart, Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <importErrorMessage>Impossibile importare questa web part.</importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="StatesJson" type="string">{}</property>
        <property name="UseSharedDataProvider" type="bool">False</property>
        <property name="UseSimplifiedQueryBuilder" type="bool">False</property>
        <property name="QueryGroupName" type="string">Default</property>
        <property name="LogAnalyticsViewEvent" type="bool">False</property>
        <property name="SelectedPropertiesJson" type="string">["PublishingImage","PictureURL","PictureThumbnailURL","Path","OriginalPath","SiteID","Title","Description","SecondaryFileExtension","ContentTypeId"]</property>
        <property name="PropertyMappings" type="string" />
        <property name="ShowAdvancedLink" type="bool">True</property>
        <property name="NumberOfItems" type="int">3</property>
        <property name="EmitStyleReference" type="bool">True</property>
        <property name="ShowPreferencesLink" type="bool">True</property>
        <property name="ServerIncludeScriptsJson" type="string">null</property>
        <property name="IncludeResultTypeConstraint" type="bool">False</property>
        <property name="Height" type="string" />
        <property name="MaxPagesBeforeCurrent" type="int">4</property>
        <property name="ResultType" type="string" />
        <property name="ShowDidYouMean" type="bool">False</property>
        <property name="StartingItemIndex" type="int">1</property>
        <property name="AlwaysRenderOnServer" type="bool">False</property>
        <property name="GroupTemplateId" type="string">~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Group_Content.js</property>
        <property name="ResultTypeId" type="string" />
        <property name="ItemTemplateId" type="string">~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Item_RecommendationsClickLogging.js</property>
        <property name="AllowConnect" type="bool">True</property>
        <property name="HelpUrl" type="string" />
        <property name="ResultsPerPage" type="int">3</property>
        <property name="RenderTemplateId" type="string">~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Control_List.js</property>
        <property name="AllowEdit" type="bool">True</property>
        <property name="AllowZoneChange" type="bool">True</property>
        <property name="AddSEOPropertiesFromSearch" type="bool">False</property>
        <property name="AdvancedSearchPageAddress" type="string">advanced.aspx</property>
        <property name="HitHighlightedPropertiesJson" type="string">["Title","Path","Author","SectionNames","SiteDescription"]</property>
        <property name="TitleUrl" type="string" />
        <property name="EmptyMessage" type="string" />
        <property name="ShowBestBets" type="bool">False</property>
        <property name="ShowViewDuplicates" type="bool">False</property>
        <property name="AllowHide" type="bool">True</property>
        <property name="BypassResultTypes" type="bool">True</property>
        <property name="Description" type="string">La web part Ricerca contenuto consente di visualizzare gli elementi che sono il risultato di una query di ricerca specificata.Quando la si aggiunge alla pagina, questa web part mostra gli elementi modificati di recente dal sito corrente. È possibile modificare questa impostazione per visualizzare gli elementi da un altro sito o elenco modificando la web part e cambiandone i criteri di ricerca.Quando vengono individuati nuovi contenuti dalla ricerca, la web part mostra un elenco di elementi aggiornato ogni volta che si visualizza la pagina.</property>
        <property name="ShowSortOptions" type="bool">False</property>
        <property name="ExportMode" type="exportmode">All</property>
        <property name="AllowMinimize" type="bool">True</property>
        <property name="ShowPersonalFavorites" type="bool">False</property>
        <property name="ChromeType" type="chrometype">None</property>
        <property name="ShowPaging" type="bool">True</property>
        <property name="ChromeState" type="chromestate">Normal</property>
        <property name="CatalogIconImageUrl" type="string" />
        <property name="HelpMode" type="helpmode">Modeless</property>
        <property name="TitleIconImageUrl" type="string" />
        <property name="ItemBodyTemplateId" type="string" />
        <property name="AlternateErrorMessage" type="string" null="true" />
        <property name="Hidden" type="bool">False</property>
        <property name="TargetResultTable" type="string">RelevantResults</property>
        <property name="AllowClose" type="bool">True</property>
        <property name="MissingAssembly" type="string">Impossibile importare questa web part.</property>
        <property name="ShowResultCount" type="bool">True</property>
        <property name="ShowLanguageOptions" type="bool">True</property>
        <property name="ShowUpScopeMessage" type="bool">False</property>
        <property name="Width" type="string" />
        <property name="RepositionLanguageDropDown" type="bool">False</property>
        <property name="Title" type="string">CustomImageProgetti</property>
        <property name="ScrollToTopOnRedraw" type="bool">False</property>
        <property name="ShowResults" type="bool">True</property>
        <property name="ShowAlertMe" type="bool">True</property>
        <property name="OverwriteResultPath" type="bool">True</property>
        <property name="PreloadedItemTemplateIdsJson" type="string">null</property>
        <property name="MaxPagesAfterCurrent" type="int">1</property>
        <property name="ShowDefinitions" type="bool">False</property>
        <property name="ShouldHideControlWhenEmpty" type="bool">True</property>
        <property name="AvailableSortsJson" type="string">null</property>
        <property name="DataProviderJSON" type="string">{"QueryGroupName":"Default","QueryPropertiesTemplateUrl":"sitesearch://webroot","IgnoreQueryPropertiesTemplateUrl":false,"SourceID":"8413cd39-2156-4e00-b54d-11efd9abdb89","SourceName":"Local SharePoint Results","SourceLevel":"Ssa","CollapseSpecification":"","QueryTemplate":"path:\"http://intranet.sinergia.bcc.it/progetti\"  contentclass:STS_Web WebTemplate:PROJECTSITE","FallbackSort":[],"FallbackSortJson":"[]","RankRules":[],"RankRulesJson":"[]","AsynchronousResultRetrieval":false,"SendContentBeforeQuery":true,"BatchClientQuery":true,"FallbackLanguage":-1,"FallbackRankingModelID":"","EnableStemming":true,"EnablePhonetic":false,"EnableNicknames":false,"EnableInterleaving":false,"EnableQueryRules":true,"EnableOrderingHitHighlightedProperty":false,"HitHighlightedMultivaluePropertyLimit":-1,"IgnoreContextualScope":true,"ScopeResultsToCurrentSite":false,"TrimDuplicates":false,"Properties":{"TryCache":true,"Scope":"{Site.URL}","UpdateLinksForCatalogItems":true,"EnableStacking":true,"ListId":"394fc748-515f-422d-a8fa-5f0dafa21f58","ListItemId":3},"PropertiesJson":"{\"TryCache\":true,\"Scope\":\"{Site.URL}\",\"UpdateLinksForCatalogItems\":true,\"EnableStacking\":true,\"ListId\":\"394fc748-515f-422d-a8fa-5f0dafa21f58\",\"ListItemId\":3}","ClientType":"ContentSearchRegular","UpdateAjaxNavigate":true,"SummaryLength":180,"DesiredSnippetLength":90,"PersonalizedQuery":false,"FallbackRefinementFilters":null,"IgnoreStaleServerQuery":false,"RenderTemplateId":"DefaultDataProvider","AlternateErrorMessage":null,"Title":""}</property>
        <property name="Direction" type="direction">NotSet</property>
      </properties>
    </data>
  </webPart>
</webParts>

Do you know why the property is not included?

1

Well you can include it manually and it definitely understands it while importing. I think when a property is marked as WebBrowsable(false) attribute in code, it does not participate in export option.

 <property name="ItemXslLink" type="string">/Style Library/XSL Style Sheets/blahblah.xsl</property>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.