Skip to main content
added 220 characters in body
Source Link
Dikesh Gandhi
  • 7.2k
  • 4
  • 31
  • 58

Template Type ID for Promoted Links List is 170

You can try below list instance code in Visual Studio with SharePoint feature to create a new Promoted links list:

Follow below steps:

  • Create new empty element in Visual Studio solution.
  • In its element.xml file, copy paste below XML code.
  • Deploy the solution in SharePoint farm.

In SharePoint site, you will see new list will be created using "Menu" title and one item "Test 1" in it. This way you can add your required links in this list as shown in below code.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="Menu" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="192efa95-e50c-475e-87ab-361cede5dd7f" Url="Lists/Menu" Description="List instance description">
    <Data>
      <Rows>
        <Row>
          <Field Name="Id">1</Field>
          <Field Name ="Title">Test 1</Field>
          <Field Name="Description">Test description</Field>
          <Field Name="LaunchBehavior">In page navigation</Field>
          <Field Name="TileOrder">0</Field>
          <Field Name="BackgroundImageLocation">~sitecollection/Style%20Library/Images/test.png</Field>
          <Field Name="LinkLocation">~sitecollection/SitePages/Home.aspx</Field>
        </Row>
      </Rows>
    </Data>
  </ListInstance>

</Elements>

Hope this will help you!

Template Type ID for Promoted Links List is 170

You can try below list instance code in Visual Studio with SharePoint feature to create a new Promoted links list:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="Menu" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="192efa95-e50c-475e-87ab-361cede5dd7f" Url="Lists/Menu" Description="List instance description">
    <Data>
      <Rows>
        <Row>
          <Field Name="Id">1</Field>
          <Field Name ="Title">Test 1</Field>
          <Field Name="Description">Test description</Field>
          <Field Name="LaunchBehavior">In page navigation</Field>
          <Field Name="TileOrder">0</Field>
          <Field Name="BackgroundImageLocation">~sitecollection/Style%20Library/Images/test.png</Field>
          <Field Name="LinkLocation">~sitecollection/SitePages/Home.aspx</Field>
        </Row>
      </Rows>
    </Data>
  </ListInstance>

</Elements>

Hope this will help you!

Template Type ID for Promoted Links List is 170

You can try below list instance code in Visual Studio with SharePoint feature to create a new Promoted links list:

Follow below steps:

  • Create new empty element in Visual Studio solution.
  • In its element.xml file, copy paste below XML code.
  • Deploy the solution in SharePoint farm.

In SharePoint site, you will see new list will be created using "Menu" title and one item "Test 1" in it. This way you can add your required links in this list as shown in below code.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="Menu" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="192efa95-e50c-475e-87ab-361cede5dd7f" Url="Lists/Menu" Description="List instance description">
    <Data>
      <Rows>
        <Row>
          <Field Name="Id">1</Field>
          <Field Name ="Title">Test 1</Field>
          <Field Name="Description">Test description</Field>
          <Field Name="LaunchBehavior">In page navigation</Field>
          <Field Name="TileOrder">0</Field>
          <Field Name="BackgroundImageLocation">~sitecollection/Style%20Library/Images/test.png</Field>
          <Field Name="LinkLocation">~sitecollection/SitePages/Home.aspx</Field>
        </Row>
      </Rows>
    </Data>
  </ListInstance>

</Elements>

Hope this will help you!

Source Link
Dikesh Gandhi
  • 7.2k
  • 4
  • 31
  • 58

Template Type ID for Promoted Links List is 170

You can try below list instance code in Visual Studio with SharePoint feature to create a new Promoted links list:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="Menu" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="192efa95-e50c-475e-87ab-361cede5dd7f" Url="Lists/Menu" Description="List instance description">
    <Data>
      <Rows>
        <Row>
          <Field Name="Id">1</Field>
          <Field Name ="Title">Test 1</Field>
          <Field Name="Description">Test description</Field>
          <Field Name="LaunchBehavior">In page navigation</Field>
          <Field Name="TileOrder">0</Field>
          <Field Name="BackgroundImageLocation">~sitecollection/Style%20Library/Images/test.png</Field>
          <Field Name="LinkLocation">~sitecollection/SitePages/Home.aspx</Field>
        </Row>
      </Rows>
    </Data>
  </ListInstance>

</Elements>

Hope this will help you!