Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Customise an ASPX in the layouts directory that is not visible in SharePoint Designer

$
0
0

Hi

I want to be able to deploy a customised ASPX page in a Visual Studio WSP solution to my site. There is a file named CopySharedPage.aspx which is used for the dialog that pops up when you edit a page that has multiple friendly URLs. Our users get confused by this and several of them have clicked the option to 'Edit page for single URL (my page url)' which does  this "Create a copy of the page for the URL you were just on to edit it independent of other URLs." We don't want them doing that. In our site we often have multiple URLs for marketing reasons, but only want to maintain the one physical page of content. I can edit the CopySharedPage.aspx file inC:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS directly on the server and comment out or delete the section that creates the link to Edit page for single URL (which consequently creates a copy of the page). But I would prefer to do this as part of my VS solution to make deployment easier. In my solution I have branding files such as master page, layouts and search assets such as a custom refiner and modified Item_Default.html. All of those items can be found in SharePoint Designer and they can also be replaced by having a module in VS with those files and with entries to place them using elements.xml in the module.

I tried to do the same with the CopySharedPage.aspx but it doesn't overwrite the one on the server. This is my elements.xml for the module:

<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><Module Name="LayoutCustomisations" Url="_catalogs/layouts"><!-- This page is the edit dialog when a page has multiple friendly URLs associated with it - we are hiding the option to create a cpy for editing that single URL --><File Path="LayoutCustomisations\CopySharedPage.aspx" Url="CopySharedPage.aspx" ReplaceContent="True"></File></Module></Elements>

I end up getting a CopySharedPage.aspx created at

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\MyWebsite_Site\LayoutCustomisations\CopySharedPage.aspx but it isn't used. The original one is still there in the 15\TEMPLATE\LAYOUTS directory and being used.

Is there something I am doing wrong or do I have to do this a completely different way? Maybe it's not a supported customisation?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>