Header logo and website title

csolisre's picture
csolisre
Sun, 03/10/2019 - 11:10
#1
Header logo and website title

.HI!

First of all, congratulations awesome theme.

Regarding the header, I could change the logo at admin/appearance/settings/md_megatron (logo section). The changes are applied but just after cache is cleared.  It (the logo) can't be changed at admin/structure/block/block-content/(your_header) because it's a drupal block right?  Ok, I got the logo working but the website title is gone. It just works if the default logo is selected at admin/appearance/settings/md_megatron (logo section) and clear cache again.

I'm doing something wrong?



cindy's picture
cindy
Mon, 03/11/2019 - 05:27

Hello,

You can upload logo image of header here: http://develop.aistriu.eu/develop/admin/structure/block/block-content

csolisre's picture
csolisre
Mon, 03/11/2019 - 14:51

Sorry to ask again but I don't understand at Mysite/admin/structure/block/block-content I choose the header I want to change but the logo is a drupal block inside an awe-block. I'm not allowed to set a logo there, you mean as background? 

(I installed the default profile) I think is this code at templates/blocks/block--system-menu-block.html.twig

                    <a href="{{ base_path }}">

                      {% if default_logo %}

                        <div class="logo">

                          <svg> 

                            <g><path></g>

                          </svg>

                        </div>

                        <div class="brand">MEGATRON</div>

                      {% else %}

                        <img src="{{ file_url(logo_path) }}" alt="" />

                      {% endif %}

                    </a>

I change the code to my needs but no changed is applied. Could you please point me to the right file I can modify it myself.

cindy's picture
cindy
Tue, 03/12/2019 - 05:37

Hello

We could not log in your site anymore

Please check again

cindy's picture
cindy
Tue, 03/12/2019 - 22:26

Hello,

We cannot log in

We get message "Unrecognized username or password. Forgot your password?"

cindy's picture
cindy
Wed, 03/13/2019 - 22:46

Hello

We have changed logo in theme settings. Please see  https://prnt.sc/mxlazx
You can change with your own. Then remember to clear drupal cache after changing logo

cindy's picture
cindy
Sat, 03/16/2019 - 05:23

Hi,

So, you want to display both logo and sitename next to the logo?

csolisre's picture
csolisre
Sat, 03/16/2019 - 06:08

  Yes, I found the code responsible for doing that (post#4). for example at megatron/templates/blocks/block--system-menu-block.html.twig. The problem is that I found the same code in more files and I'm not able to find the right one. 

Thank you

cindy's picture
cindy
Mon, 03/18/2019 - 22:34

Hello,

Sorry for the late respond. You should modify the code

Please follow:

1. Open file nav1-template.html.twig, nav2-template.html.twig, nav3-template.html.twig, which are all put in folder modules/custom/md_nav, tìm tên các folder chứa các file đó lần lượt là nav1, nav2, nav3
2. Find and replace:

<svg> viewBox="0 0 100 100">    <g> 
<path> d="M64.264,31.886v56.803l-14.319,8.259l-14.319-8.259v-74.3L14.157,26.771v41.271l7.156,4.128V30.905 l13.467-7.768v8.26l-6.311,3.64V84.56L7,72.178v-49.54L42.781,2v82.553l7.162,4.132l7.163-4.132V27.758L64.264,31.886z M43.626,26.294l6.317-3.644L71.42,35.038V84.56l21.469-12.382v-49.54L57.106,2v15.546l7.157,4.128v-7.285l21.469,12.382v41.271 l-7.156,4.128V30.905L49.943,14.391l-6.317,3.644V26.294z"/> </g>
</svg>

with:

<img src="url_of_file_logo" alt="" />

3. Save and clear Drupal cache

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.