Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

How to avoid / in ankers


Reply

4 Posts   810 Views

Avatar
Andre

12 August 2009 at 4:55am Community Member, 126 Posts

Hi,

short, I want to use jquer idTabs, but have a Problem with the anker-tags.

idTags needs the following Syntax to work

<ul class="idTabs">
<li><a href="#jqtabs4-1" class="linked">1</a></li>
<li><a href="#jqtabs4-2" class="linked">2</a></li>
</ul>

So i wrote the following Template

<ul class="idTabs">
<% control Object %>
<li><a href="#jqtabs2-{$Pos}" class="linked">{$Pos}</a></li>
<% end_control %>
</ul>

The damn thing always generates the following for me:

<ul class="idTabs">
<li><a href="/#jqtabs4-1" class="linked">1</a></li>
<li><a href="/#jqtabs4-2" class="linked">2</a></li>
</ul>


or

<ul class="idTabs">
<li><a href="/?flush=1#jqtabs4-1" class="linked">1</a></li>
<li><a href="/?flush=1#jqtabs4-2" class="linked">2</a></li>
</ul>


when i flush

so how do i prevent adding the leading slashes?

Avatar
banal

12 August 2009 at 7:19am Community Member, 901 Posts

Hi Andre

That's really strange. I'm just working on a site where I make use of the jQuery Tabs and I used a template much like yours

<div id="TabContent">
   <ul>
      <% control Tabs %>
      <li><a href="#content$ID">$TabTitle</a></li>
      <% end_control %>
   </ul>
   <% control Tabs %>
   <div id="content$ID">$TabContent</div>
   <% end_control %>
</div>

I get the leading slashes too (actually the whole path), but it works nevertheless. It should work with the slashes anyway... why do they pose a problem for you?

Avatar
Andre

12 August 2009 at 9:26pm Community Member, 126 Posts

I dont need them to go away if it works nevertheless, but it doesn't so I thought maybe the slashes are the Problem.

Avatar
Andre

12 August 2009 at 9:33pm Community Member, 126 Posts

damn, it's working now, I found the Problem. I was using <div class="jqtab"> instead of <div id="jqtab">.