Portfolio Dropdown to Header Menu

Description

07.26c01v3 Portfolio Dropdown to Header Menu

#1. Install Code

#1.1. First, find Portfolio Page URL

In my example, we will have: /project-02

07.26c01v3 Portfolio Dropdown to Header Menu

#1.2. Create a Dropdown to Main Navigation

07.26c01v3 Portfolio Dropdown to Header Menu

Dropdown will have

  • Name: you can enter anything what you want
  • URL Slug: use format: /dropdown-{portfolio page url slug} – In my example, it will be: /dropdown-project-02

07.26c01v3 Portfolio Dropdown to Header Menu

#1.3. Use this code to Code Injection > Footer

  • If you use Personal/Basic Plan and your plan doesn’t support Injection, see #3.1
<!-- 07.26c01v3 Portfolio Dropdown to Header Menu -->
<script>
window.PortfolioDropdownConfig = {
  dropdownPrefix: "/dropdown-",
  iconPosition: "before",
  iconSize: "34px",
  iconTitleSpace: "12px",
  imageFormat: "100w",
  openPageOnTitleClick: true,
  hideArrowOnMobile: true
};
</script>
<script src="https://code.beaverhero.com/portfolio/0726c01v3portfoliodropdownmenu.js"></script>

07.26c01v3 Portfolio Dropdown to Header Menu

#2. Customize

#2.1. To change icon size before item title, change Line 06

iconSize: "34px",

#2.2. On mobile, by default, if users click Dropdown Title it will open Portfolio Page without opening new panel.

If you want to enable new panel on click dropdown title, like this

07.26c01v3 Portfolio Dropdown to Header Menu

You can change Line 09 – Line 10

openPageOnTitleClick: true,
hideArrowOnMobile: true

to

openPageOnTitleClick: false,
hideArrowOnMobile: false

#3. Other

#3.1. If you use Personal/Basic Plan and your plan doesn’t support Injection, you can edit Site Footer

05.26c08v1 Event Default Location

Add a Markdown Block

04.26c10v2 Header Sound Icon

Add this code into Markdown Block

<script>
window.PortfolioDropdownConfig = {
  dropdownPrefix: "/dropdown-",
  iconPosition: "before",
  iconSize: "34px",
  iconTitleSpace: "12px",
  imageFormat: "100w",
  openPageOnTitleClick: true,
  hideArrowOnMobile: true
};
</script>
<script src="https://code.beaverhero.com/portfolio/0726c01v3portfoliodropdownmenu.js"></script>

07.26c01v3 Portfolio Dropdown to Header Menu

Buy me a coffee