0

how to deploy a page with XML in Visual Studio that having Friendly Url?

Does anyone knows how can I do that?

example what not have Friendly Url

<File Path="Home.aspx" Url="Home.aspx" Type="GhostableInLibrary" Level="Published" ReplaceContent="TRUE" IgnoreIfAlreadyExists="TRUE">
  <Property Name="Title" Value="Home" />
  <Property Name="Comments" Value="Página de inicio" />
  <Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/pagelayout.aspx, Diseño de página" />
  <Property Name="ContentType" Value="Diseño de página" />
</File>
1
+50

I don't think you can accomplish this declaratively via CAML within an elements.xml file. However, if you are developing for SharePoint 2013 you may want to look into managed navigation, specifically the friendly URLs functionality:

"Friendly URLs are URLs that correspond to a term in the navigation term set, and that provide a shorter, more meaningful URL to a page. This makes the URL more useful to visitors to your site, and also improves search engine optimization (SEO) for your site. For example, the URL http://www.contoso.com/products/household/vacuum-cleaner is more meaningful to both users and search engines than the URL http://www.contoso.com/Products/Inventory/Pages/productViewer.aspx?productID=115&name=vacuum%20cleaner&CID=34q327234ef. By default, when you create a new page, a new navigation term is created, and a corresponding friendly URL is created for the page. You can use a single friendly URL to point to a single page. You can also have multiple friendly URLs that point to the same page, such as a category page. For example, if you use cross-site publishing to display content from a knowledge base, you can have separate friendly URLs for /kb/manuals, /kb/troubleshooting-guides, and /kb/product-specs that all point to the same category page, Category-KB-Articles.aspx. You do not have to use cross-site publishing to use multiple friendly URLs that point to the same page."

If, on the other hand, you are developing for SharePoint 2010, check out this blog post by SharePoint MVP Waldek Mastykarz. He discusses a few options for getting friendly URLs working in SharePoint 2010.

| improve this answer | |
0

You can use meta data managed navigation

| improve this answer | |

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.