Navigation in Content on MasterPage

Brenden Kehren asked on July 11, 2014 21:11

I've got a unique design where the < head > doesn't contain the main navigation. The design shows the navigation within the content of every page. The "hero" section is unique for every page and possible it may not be on some pages at all. Any suggestions on how to accomplish this using Portal?

Here is some boilerplate code:

<head>
    <div class="mobileNav">
        <!-- nav items here -->
    </div>
</head>
<div class="hero">
    <!-- hero image and text -->
    <!-- needs to be page specific or not at all -->
</div>
<div class="mainNav">
    <!-- main nav UL here -->
    <!-- want this at a global level -->
</div>
<div class="content">
    <!-- content -->
    <!-- page specific -->
</div>
<div class="footer">
    <!-- footer items -->
</div>

Correct Answer

Joel Dahlin answered on July 12, 2014 23:03

I would create a master for all that, but replace the hero and content divs with content place holders. Then on the subpages you can populate as you wish. For pages that don't have a hero, just don't add anything that placeholder. If you want to have a template that may or may not have a hero you could create a doc type for the hero and then use a repeater in that content placeholder that looks for a hero below it. If one isn't found, nothing displays.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Jim Spillane answered on July 12, 2014 21:54 (last edited on December 10, 2019 02:30)

Maybe try adding a Static text webpart on the masterpage with the hero content in the text property...

<div class="hero">
    <!-- hero image and text -->
    <!-- needs to be page specific or not at all -->
</div>

Then set the visibilty of the webpart based on the value of the hero field in the doctype like: {% HeroImage.Length > 0 |(identity)GlobalAdministrator%}

0 votesVote for this answer Mark as a Correct answer

Joel Dahlin answered on July 12, 2014 23:06

Sorry, I meant page placeholders and here is a reference on how to use multiple ones. http://devnet.kentico.com/articles/using-multiple-page-placeholders-in-portal-engine

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.