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

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

Related

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.

HTML Widget on many pages - Orchard CMS

I have an HTML widget in the after-content section which will be displayed on 7 pages out of 12. I was reading up on it but didn't find anything except people mentioning rules, I went through the documentation and looked at using "or" rule with url("~/page1") like url("~/page2") or url("~/page3") so on. Will this not show all widgets on all pages? i just want to show one html widget at the bottom of many pages.
Thanks,
Adil
You should create a new layer "MyNewLayer" and then add your rule(s) there. Then, place the widget to be shown on this layer.

Orchard CMS - Custom Theme, Creating sections, one with second Navigation

I have a custom theme, the footer, header & home page are all working.
I have a main navigation that links to 5 pages.
I now need to set the style for these 5 pages - and the other pages that link from them (it's different to the home page) - one section of which needs an additional navigation menu on the left (main nav is top).
Would I do this in Visual Studio - or can it be done through the admin web interface?
What is the best approach?
Thanks.
You can add an additional navigation widget on a layer that is not the homepage. As for styling differently on different pages, you could do that many ways.
For example, you could check if the page you are loading is the homepage and load some styles to overwrite the default ones. That would be the easy way I suppose.
If you need a whole new layout for the homepage, you could check out this module on the gallery which lets you select a different layout to use for each content item. Never used it myself, but looks like it could be cool :) http://gallery.orchardproject.net/List/Modules/Orchard.Module.Downplay.Orchard.LayoutSelector

How can I specifiy an alternate layout for NotFound.cshml and ErrorPage.cshtml in Orchard CMS

I know you can use layout filters for normal pages with urls, but upon errors the view changes while keeping the url the same, so I can't utilize a new layout based on the path. Any help would be appreciated. Thank you!
Off the top of my head:
If you look in Core > Shapes > Views, you will see two files - one called ErrorPage.cshtml and one called NotFound.cshtml. Simply copy these files and paste them into your theme's view folder.
I have not tested this method with these particular pages, but I did do something similar with the LogOn widget.
Something to bear in mind is that the contents of these files will be rendered in the Content zone of your current theme.

Create a Sharepoint page but don't show in breadcrumb

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>

Resources