0

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?

1

2 Answers 2

2

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%}.

1
  • The only missing part that I can see is that it will not add H1 tag in the head. It is recommended to have H1 in head tag. The only change required is to put this code in HEAD HTML webpart. Feb 17, 2017 at 15:25
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.