Alternate Navigation Style

3 replies·opened Apr 9, 2020
S
serkanorenApr 9, 2020

I am using the Alternate Navigation Style module on the tabs.html page.

I have reviewed your help document and the questions previously asked on your form, but have not found a solution.

Snav-content1 comes by default when the page loads

it works well.

<li><a href="#snav-content1"><i class="icon-volume-increase"></i>Duyuru Ekle<i class="icon-chevron-right"></i></a></li>
<li><a href="#snav-content2"><i class="icon-refresh"></i>Duyuru Düzenle<i class="icon-chevron-right"></i></a></li>
<li><a href="#snav-content3"><i class="icon-mute"></i>Duyuru Kaldır<i class="icon-chevron-right"></i></a></li>
<li><a href="#snav-content4"><i class="icon-volume-decrease"></i>Duyuru Sil<i class="icon-chevron-right"></i></a></li>

but i am working in a different tab and when the page is refreshed href = "# snav-content1" is loaded. I want the tab I'm working on to be selected.

Can the script code be updated as specified?
Or is it a solution to cancel the active tab feature?

sample code:

<div id="side-navigation" class="tabs customjs">

                <div class="col_one_third nobottommargin">

                    <ul class="sidenav">

                        <li><a href="#snav-content1"><i class="icon-volume-increase"></i>Duyuru Ekle<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content2"><i class="icon-refresh"></i>Duyuru Düzenle<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content3"><i class="icon-mute"></i>Duyuru Kaldır<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content4"><i class="icon-volume-decrease"></i>Duyuru Sil<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content5"><i class="icon-file-pdf"></i>Belge Yükle<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content6"><i class="icon-file-medical-alt"></i>Belge Sil<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content7"><i class="icon-eye1"></i>İcon Yükle<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content8"><i class="icon-eye-slash1"></i>İcon Sil<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content9"><i class="icon-comment-dots1"></i>Hazır Metin Yükle<i class="icon-chevron-right"></i></a></li>
                        <li><a href="#snav-content10"><i class="icon-comment-slash"></i>Hazır Metin Sil<i class="icon-chevron-right"></i></a></li>
                       
                    </ul>

                </div>

<div class="col_two_third col_last nobottommargin">

                    <div id="snav-content1">
                        <h5>Duyuru Oluştur</h5>
                        <ul class="skills">
                            <li data-percent="100">
                                <div class="progress">
                                    <div class="counter counter-inherit counter-instant"></div>
                                </div>
                            </li>
                        </ul><br />
                         
			            <form style="max-width: 40rem;">
                             
                            
                            <div class="form-group">
								Hazır Metin Kullanmak için Seçim Yapınız.
							  <asp:DropDownList ID="ddlListe" class="form-control" runat="server" OnSelectedIndexChanged="ddlListe_SelectedIndexChanged" AutoPostBack="True">
                               
                                </asp:DropDownList>
							</div>                         
                           				
							
							<div class="form-group">
								Duyuru Mesajınızı Yazınız. (Maksimum 200 Karakter Girilebilir.)	<br />
                                  <asp:Label ID="lbltxtMesaj" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Visible="False"></asp:Label><br />

                                <asp:TextBox ID="txtYaz"  class="form-control"  runat="server" TextMode="MultiLine" Height="150px" ></asp:TextBox>
							</div>
                                
                                  
							<div class="form-group">
								Link Paylaşımı yapılacak ise Link stilini seçiniz.<br />
                                  <asp:DropDownList ID="ddLinkSecimi" class="form-control" runat="server" OnSelectedIndexChanged="ddLinkSecimi_SelectedIndexChanged" AutoPostBack="True" Width="320px">
                                  <asp:ListItem Value="0" Selected="True">Link Yok</asp:ListItem>
                                   <asp:ListItem Value="1">X web adresine link vermek istiyorum.</asp:ListItem>
                                  <asp:ListItem Value="2">Menüler için link vermek istiyorum.</asp:ListItem>
                                   <asp:ListItem Value="3">Belgeler için link vermek istiyorum.</asp:ListItem>
                                </asp:DropDownList>
							</div>
                                 
                                  <asp:Panel ID="pnlXLink" runat="server"  Visible="false">

                                        <div class="input-group-prepend">
									<span class="input-group-text">http://</span> <asp:TextBox ID="txtXLink" runat="server" class="form-control" Text="" Width="300px" CssClass="auto-style1"></asp:TextBox>
										</div>
                                      <div class="input-group-prepend">
                                      <asp:CheckBox ID="cbXLink" runat="server" BorderColor="Red" BorderStyle="Outset" Checked="True" Height="30px" Text="Yeni sekmede açılsın." OnCheckedChanged="cbXLink_CheckedChanged" />
                                      </div>

                                  </asp:Panel>
                                  <asp:Panel ID="pnlMenu" runat="server"  Visible="false">

                                        <div class="input-group-prepend">
									<span class="input-group-text">https://www.antalyaulasim.com.tr/</span> 
                                             <asp:DropDownList ID="ddlMenu" class="form-control" runat="server"  Width="320px" OnSelectedIndexChanged="ddlMenu_SelectedIndexChanged">                                                                                         
                                            
                                          </asp:DropDownList>

										</div> 

                                       <div class="input-group-prepend">
                                      <asp:CheckBox ID="cbMenu" runat="server" BorderColor="Red" BorderStyle="Outset" Checked="True" Height="30px" Text="Yeni sekmede açılsın." OnCheckedChanged="cbXLink_CheckedChanged" />
                                      </div>

                                  </asp:Panel>
                                  <asp:Panel ID="pnlBelge" runat="server" Visible="false">

                                      <asp:Label ID="lblBelgeMesaj" runat="server" Text="Listede belge adınız yok ise, Belge Yükle menüsünü kullanınız." Font-Bold="True" ForeColor="Red"></asp:Label>
                                            <div class="input-group-prepend">
									         <span class="input-group-text">/Content/siteLayout/belge/</span> 
                                             <asp:DropDownList ID="ddlBelge" class="form-control" runat="server"  Width="320px" OnSelectedIndexChanged="ddlBelge_SelectedIndexChanged">
                                           
                                            
                                          </asp:DropDownList>

										</div> 
                                                <div class="input-group-prepend">
                                      <asp:CheckBox ID="cbBelge" runat="server" BorderColor="Red" BorderStyle="Outset" Checked="True" Height="30px" Text="Yeni sekmede açılsın." OnCheckedChanged="cbXLink_CheckedChanged" />
                                      </div>                                                                

                                  </asp:Panel>
                            
							  İcon Seçiniz. - <asp:Label ID="lblIDAl" runat="server" Text="" Visible="false" ForeColor="Red" Font-Bold="True"></asp:Label>
                                <asp:Label ID="lblYolAl" runat="server" Text="" Visible="false" ForeColor="Red" Font-Bold="True"></asp:Label>
								<div id="instagram-photos" class="instagram-photos masonry-thumbs grid-4" data-count="12">
                                     
                                  <asp:DataList ID="dlFoto" runat="server" RepeatColumns="6" OnItemCommand="dlFoto_ItemCommand" CssClass="auto-style1" DataKeyField="ID" class="form-control">

                                      <ItemTemplate>

                                  
                                          <asp:ImageButton ID="btnFoto" runat="server" Width="50" Height="50" ImageUrl='<%#Eval("DuyuruFotoYolu")%>' CommandName="imgBtnFoto"  />
                                     

                                      </ItemTemplate>

                                  </asp:DataList>
								</div>
                       						
						    </form>
                                      
                         
                     

						
                     
                             
                           <div class="col_full nobottommargin">
								     <asp:Button class="button button-3d button-black nomargin" ID="btnYayinla" runat="server" Text="Yayınla" OnClick="btnYayinla_Click" />
								</div>
                        
                           <asp:Label ID="lblYayinlaMesaj" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Visible="False"></asp:Label><br />
                          
                           <br />

                    </div>

                    <div id="snav-content2">
                       <div class="col_full nobottommargin">
								     <asp:Button class="button button-3d button-black nomargin" ID="Button1" runat="server" Text="test" />
								</div>

                    </div>

                    <div id="snav-content3">
                       <h5>Duyuru Sil </h5>
                        <ul class="skills">
                            <li data-percent="100">
                                <div class="progress">
                                    <div class="counter counter-inherit counter-instant"></div>
                                </div>
                            </li>
                        </ul><br />

                    </div>

                    <div id="snav-content4">

                    </div>

                    <div id="snav-content5">

                    </div>

                    <div id="snav-content6">
                      
                    </div>

                

                </div>

  <script>
        $(function () {
            $("#side-navigation").tabs({ show: { effect: "fade", duration: 400 } });
        });
    </script>
S
SemiColonWebSTAFFApr 11, 2020

Hello,

The #snav-content1 is selected as it is the First Tab. You can use the URL with Hash like: https://your-website.com/page.html#snav-content1 to make the Tab Active based on the Tab Hash defined. But you will need to use your own Custom JS Codes to change the Hash Navigation in Browser's Address Bar or in the Cookie Memory to enforce this behavior as there is no built in code for this available at the moment.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

S
serkanorenApr 11, 2020

Thank you. Your guidance gave me an idea and I solved the problem

S
SemiColonWebSTAFFApr 11, 2020

Hello,

Glad that your issues were resolved. Very Happy to Help!

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard