Create a Sharepoint page but don't show in breadcrumb - sharepoint

I'm struggling to do something which I thought should be straight forward, basically I need to create an aspx page which I now realise must be put into a document library but the problem I have is it's only one page and when the page is displayed the breadcrumb has a link to the document library.
We really don't want the users to be able to get to the library via the breadcrumb and just want to show the page. From one of my other questions some other helpful people made some suggestions like putting the file in the _layout directory but this won't work because the new page has a master page associated with it.
Any ideas how I can display the custom page but not allow normal users to navigate to the document list?
Thanks!
Dan

Having a master page associated with an ASPX page does not prevent it from being placed in the _layouts directory. All of my ASPX pages use a custom master page I wrote, and they're all stored in the _layouts directory. But there's enough methods to hide the breadcrumbs without changing the storage location.
If you want to hide the breadcrumbs on only a specific page, the simplest method to do so is to prevent the contents of the breadcrumbs from being displayed. On the default master page (and I'm going assume that your master page also has this), there is a content called "PlaceHolderTitleBreadcrumb", which is what displays the breadcrumb. By overriding this in the ASPX file, you can prevent this from displaying. A simple way is to just insert the following line in your ASPX file:
<asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server"> </asp:Content>
By being in the page itself, it becomes a custom version of the breadcrumb instead of the master page's, so it won't evaluate itself and will leave you with a blank line. The will keep content inside the table cell, so it will specifically make a blank line occupy the same space that the breadcrumbs normally would. If you just put an empty content there, then it will instead render nothing there and pull all of your content upwards. Up to you if you think that looks better.
As far as where to place the line, I recommend just beneath the following lines, if your ASPX page has them. If you don't have the following lines, you might have to experiment a bit to find what position works properly.
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server">
<IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt="">
</asp:Content>

Related

How to link the page layout file to the master page?

I have a problem joining the page layout file to the master page. But nothing seems to show from my master page.
Below is my page layout for 2 column:
Below is my master page where i place my page layout inside it:
This is how my file directory look like:
The word "HAHDSDJl....." should appear in my master page. But it does not show. and i have no idea why.
I think you need to understand the use of PageLayout and Masterpage. MasterPages are used to unify the look for your website. while Page Layouts are used to provide a 2 - 3 columns to put web parts in it.
Master Pages can not have content from page layouts in any way.
So if you want to display a content from PageLayout in a master page then its not possible.
Let me know If I miss anything or wongly understand your question
Thanks

How to have H1 and byline in the master page - Kentico

I'm trying to work out a way I can add my H1 and byline markup to my Root master page and then have all the pages underneath fill these fields in. I'm using the Portal Engine development mode.
The H1 and byline are in a different web part zone to the page placeholder. They are showing on all the pages under my root node but I can't find a way to make populate the title or byline on those pages.
I've tried a few things:
- editable text web part - but this is only editable on the Root node and not the pages underneath
- I thought maybe I could use <%# Eval("Byline" %> and add this as a field to the Page type but that doesn't show through either.
Is there any way to include something in the master page that is dynamically filled in (or editable in the designer) on all pages under the root node? Or do I need to move myH1 and byline out of the master page and include in every template that my pages use?
You can add additional field to your page type named 'Byline'. This field will be editable on Form tab of each page. Then you can include some viewer web part like Document Viewer or repeater. Then configure Path like './' (it means to display information for current page). And add transformation where you cat do something like <%# Eval("Byline") %>.
Or alternative way is to use static html web part and add macro there {%CurrentDocument.Byline%}.
You can do it using macros: add a static text web part on your master and set text property to :
<h1>{%CurrentDocument.DocumentPageTitle#%}</h1>
or
<h1>{%CurrentDocument.DocumentName#%}</h1>
depending on where you keep your page title.

Kentico v9 javascript webpart and bottom load LinkedFile

In building on a previous question (Kentico v9 how can i detect when a user is in CMS desk with JavaScript), I have added a JavaScript webpart to load in my analytics.js file. Here's my code snippet:
<cms:JavaScript ID="js"
ViewMode="LiveSite"
LinkedFile="~/CMSPages/GetResource.ashx?scriptfile=/KFF/global/scripts/analytics.js"
LinkedFilePageLocation="beginning"
runat="server"></cms:JavaScript>
I can not figure out how to get this to load the JS file at the bottom of the page. What am i missing?
The Linked File Page Location is the key. There's one that renders it wherever the webpart is placed. You need to add a Web Part Zone at the bottom of the page and add them there, or if this is pure aspx then add this tag near the bottom, but the LInkedFilePageLocation should be Inline (i believe, see what the options are)
EDIT
The proper value is "startup" to make it render wherever you place it.

Orchard - access a content type through different URLs so they use different views

I'm trying to create a CSS documentation library in Orchard. I want to save a description, CSS snippet and HTML snippet against each content type. The first view would show the description and CSS and HTML code written out. The second view would show a preview of what the CSS and HTML look like rendered.
cssdocumentation.com/content/item1
cssdocumentation.com/content/item1/live-preview
I've created the content type and the first view. But I'm not sure how to create the second view. I can see if I can create the alternative URL I can use the Url Alternates module to create an overriding .cshtml
To create an alternative URL I've looked at the autoroute module but this only allows you to adapt a single URL (unless I'm missing something?) and I've looked at Alias UI but this forces me to manually create an alternative URL everytime I create a content item.
Is this possible in Orchard without writting too much C#? (I'm a frontend developer so I only dabble in the behind the scenes stuff)
Thanks for any help
Best solution is to do this within your own module. But as a secondary option instead of having a second page, combine this content with your first page and hide it with CSS. When the user clicks a button to navigate to the next step render the CSS/HTML result on the same page. You can do this in many ways, here are a few ideas:
Render the CSS/HTML result out straight away on the same page but hide it. Show it when the user clicks a button
using jQuery to render the result on the client side. More dynamic if you allow editing of the HTML and CSS.
Redirecting the user to the same page with specific url parameters which you can pick up in your alternate to modify the output.

Change Sharepoint main page name without changing URL

I have a SharePoint website, my main page is on mySiteRoot/Pages/default.aspx (quite normal until here I think) but the problem is that the name in the browser tab is also "default".
I want to change the name displaying in the tab without changing the name of the .aspx file, but despite all my searches I can't find it on SharePoint.
Does someone have a solution ?
Each page in SharePoint should have a Name and a Title. The Name refers to the filename of the page, and thus affects the page's URL (in your case, "default.aspx").
The Title is independent of the page Name, and this is what is displayed in the browser title bar / tab.
To edit an existing page, the easiest thing to do is to navigate to Site Actions > View All Site Content. Under the "Document Libraries" area, locate and open the "Pages" library. In the library, find "default" and from either its context menu or the ribbon, select "Edit Properties". There you can change the Title to whatever you want.
open the page in SharePoint designer.. and look for the string:
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
<SharePoint:ListItemProperty Property="BaseName" maxlength="40" runat="server"/>
</asp:Content>
Simply replace it as:
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
Your title
</asp:Content>
Hopefully you will get it working.
which edition/version of SharePoint ? I guess it's 2010 with wiki home feature enabled.
If I'm right, you have to rename the file to rename the page. But don't worry, your page will still be the home page of your site.
You can in all case click on set as default page on any page in the ribbon.
PS: you should consider posting on http://sharepoint.stackexchange.com which is the dedicated site for SharePoint Q/A.

Resources