drop-down-myaccount.html.twig in Drop Down Login 8
Template for myaccount dropdown.
Available variables
- $myaccount_text: drop down myaccount button/link text
- $myaccount_url: url for myaccount button/link
- $myaccount_links: myaccount drop down additional links
sorted by weight.
1 theme call to drop-down-myaccount.html.twig
- DropDownLoginBlock::build in src/
Plugin/ Block/ DropdownLoginBlock.php - Builds and returns the renderable array for this block plugin.
File
templates/drop-down-myaccount.html.twigView source
- {#
- /**
- * @file
- * Template for myaccount dropdown.
- *
- * Available variables
- * - $myaccount_text: drop down myaccount button/link text
- * - $myaccount_url: url for myaccount button/link
- * - $myaccount_links: myaccount drop down additional links
- * sorted by weight.
- */
- #}
-
- <div class="drop-down-login-container" id="drop-down-login-wrapper">
- <a href={{ myaccount_url }} class="login button">
- <span><span> {{ myaccount_link_text }}</span></span>
- </a>
- <div class="dropdown" style="display: none;">
- <ul class="menu">
- <li>
- <a href= {{ myaccount_url }}>
- <div>
- <strong>{{ name }}</strong>
- </div>
- <span> {{ 'View profile'|trans }})</span>
- </a>
- </li>
- {% for item in myaccount_links %}
- <li>
- {{ link(item.menu_name, item.menu_url) }}
- </li>
- {% endfor %}
- <li>
- <a href={{ logout_url }}>
- <span> {{ logout_link_text }}</span>
- </a>
- </li>
- </ul>
- </div>
- </div>