Overview
In this how to we will go over how to change the Support Button in the menu to go directly to a custom URL with no drop down options, or, how to change the support button inside the menu to go to a custom URL.
Considerations
You have SSH/FTP access to the CloudBolt appliance
Procedure
Copying files so they are not over written
Once you have logged into your CloudBolt Appliance with something like WinSCP. Create a folder in /var/opt/cloudbolt/proserv/templates/common
Copy the file header.html from /opt/cloudbolt/templates/common to the newly created folder /var/opt/cloudbolt/proserv/templates/common
Now you can modify this file in /var/opt/cloudbolt/proserv/templates/common/header.html to suit your requirements. In order to have the support button converted to a button and go directly to a link you would replace the code that starts with <li data-topnav="help" class="nav-item"> with the below:
What this will do is remove the drop down for the support button completely from the Platform and open a new tab to a specified link. In this example we are going to https://docs.cloudbolt.io but please do change this to your own URL.
The original code looks like the following:<li data-topnav="help" class="nav-item"> <a class="help-link" {% if gp.help_url %} {# TODO: are we ignoring gp.help_url now? seems like it #} href="#" {% else %} {% comment %} doc_url_path can be added to the context by views to provide links to specifically relevant parts of the docs. It should not include the first part of the URL, just everything specific to the desired page. Ex. "server-views.html#list-view" {% endcomment %} {# TODO: make doc_url_path a thing again #} href="#" {% endif %} > {% trans "Support" %} </a>
Replace with:<li data-topnav="help" class="info-btns"> <a href="https://docs.cloudbolt.io" target="_blank">{% trans "Support" %} </a>
If you want to change this so that the drop down support button has a custom URL then the following changes can be made. The code you will update will be under the same heading of Help.
Original Code to look for:<div class="info-btns"> <a href="{{ STATIC_URL }}docs/HTML/introduction.html" target="blank" class="cb-btn cb-btn-primary">Support</a> </div>
Change the URL here to suit your requirements, for example, I have changed this to https://docs.cloudbolt.io<div class="info-btns"> <a href="https://docs.cloudbolt.io" target="blank" class="cb-btn cb-btn-primary">Support</a> </div>
Caching information and restarting services to make changes available.
SSH into your CloudBolt appliance
Run the following command
/opt/cloudbolt/manage.py collectstatic --noinput
Now restart your httpd Service
systemctl restart httpd
Now when you access your CloudBolt platform you should see the Support button changes you required.
Additional information
CloudBolt Documents : https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/introduction
0 Comments