I have header with different links to subsections of my webapp:
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left -->
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link waves-effect" href="{{ url_for('homepage') }}">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect" href="{{ url_for('dashboards') }}" target="_blank">Dashboards</a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect" href="{{ url_for('support')}}" target="_blank">Support</a>
</li>
</ul>
</div>
While home will always open in the same tab, any other navbar item opens as new tab. how to prevent it? All of the below templates extends header.
@app.route('/')
def homepage():
return render_template('mainpage.html')
@app.route('/dashboards/')
def dashboards():
return render_template('dashboards.html',
labels=sample_data.index,
data=sample_data['Resource ID'],
max_instances=max_instances,
running_instances=running_instances)
@app.route('/support/')
def support():
return render_template('support.html')