Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-20 15:33:59

roelof
Member
Registered: 2005-03-27
Posts: 647

how to change my template's so this menu appears

Hello,

I need this sort of menu for my site :

<div class="pro_linedrop">
<ul class="select">
<li class="line"><a href="#nogo"><b>Category 1</b><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
	<ul class="sub">
		<li class="subline"><a href="#nogo">month 1<a></li>
                                 <li class="subline"><a href="#nogo"> month 2 <a><li>
                 </ul>
</li>
<li class="line"><a href="#nogo"><b>Category 2</b><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
	<ul class="sub">
		<li class="subline"><a href="#nogo">month 1<a></li>
                                 <li class="subline"><a href="#nogo"> month 2 <a><li>
                 </ul>
</li>
</ul>
</div>
</div>

My page template looks like this :

<div id="navigation">
  <div class="pro_linedrop">
        <ul class="select">
          <txp:article_custom category="zwangerschap" sort="Posted ASC" limit="999" listform="myform" />
      </div>
</div>

Myform looks like this :

<txp:if_different>
<li class="line"
<a href="http://www.tamarawobben.nl/index.php#nogo">
<txp:category1 title="1" />
<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
</txp:if_different>
<ul class="sub">
<li class="subline">
<txp:if_different>
<a href="<txp:site_url />?c=<txp:category1  />&amp;month=<txp:posted format="%Y-%m" />"><txp:posted format="%B" /></a>
</li>
</txp:if_different>

But the classes sub and subline doesn’t come on the right place.

Who can help me with this problem ?

Roelof

Offline

#2 2008-11-21 09:59:39

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

I tried this but no success :

txp:if_different>
<li class="line"
<a href="http://www.tamarawobben.nl/index.php#nogo">
<txp:category1 title="1" />
<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="sub">
<txp:if_different>
<li class="subline">
<a href="<txp:site_url />?c=<txp:category1  />&amp;month=<txp:posted format="%Y-%m" />"><txp:posted format="%B" /></a>
</li>
</txp:if_different>
</txp:if_different>

Roelof

Offline

#3 2008-11-21 14:15:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: how to change my template's so this menu appears

You have txp:if_different> whereas it should be txp:if_different>

why are the ie conditionals there?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2008-11-21 17:35:46

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

oke, that was a wrong copy.
in my real template it is <txp:if_different>

Why the ie conditionals i don’t know.
I try to implement this http://www.cssplay.co.uk/menus/pro_line_down_fly.html menu in my site.

Roelof

Last edited by roelof (2008-11-21 17:37:14)

Offline

#5 2008-11-24 10:04:56

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

Hello,

Someone know if i can modify this for solving my problem.

<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li">
  <txp:if_section name='<txp:section />'>&raquo;</txp:if_section>
  <txp:section link="1" title="1" />
    <txp:if_section name='<txp:section />'>
      <txp:article_custom  section='<txp:section />' wraptag="ul" break="li">
        <txp:if_article_id>&rsaquo;</txp:if_article_id>
        <txp:permlink><txp:title /></txp:permlink>
      </txp:article_custom>
  </txp:if_section>
</txp:section_list>

Regards,

Roelof

Offline

#6 2008-11-24 13:04:54

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

hello,

Im a little bit further.

How can i change this so wraptag has a class
bc. <txp:article_custom section=’<txp:section />’ wraptag=“ul” break=“li”>
i need that wraptag has a class name of “sub”

Roelof

Offline

#7 2008-11-24 15:31:51

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

hello ,

i found the answer myself.
It’s class=“sub”

But another problem now.
I have this :

<txp:category_list wraptag="ul" break="li"  exclude="Category1, gallery, voorpagina" >

Now i need to give the break a class.
If a do class=“classname” the wraptag get’s a class not the break.

Someone knows the answer to my probem ?

Roelof

Offline

#8 2008-11-24 21:49:45

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: how to change my template's so this menu appears

roelof wrote:

i found the answer myself.

So all we have to do is don’t reply to your posts… ;)

But another problem now.

Well OK, one more reply:

In 4.0.7 category_list has a form attribute, so you would probably be able to do something like this:

<txp:category_list wraptag="ul" exclude="Category1,gallery,voorpagina" form="cat_list" />

Form ‘cat_list’:

<li class="someclass"><txp:category title="1" link="1" /></li>

Offline

#9 2008-11-25 14:02:45

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

Els,

Thank you,

I gave now made this :

<div class="pro_linedrop">
     <ul class="select">
<txp:category_list wraptag="" exclude="Category1,gallery,voorpagina" form="cat_list" class=""/>
        <txp:if_category name='<txp:category />'>
      <txp:article_custom  category='<txp:category />' wraptag="ul" break="" class="sub" sortdir="asc">
                <txp:if_different>
                     <li class="subline">
                      <a href="<txp:site_url />?c=<txp:category1  />&amp;month=<txp:posted format="%Y-%m" />"><txp:posted format="%B" /></a>
                    </li>
</txp:if_different>
  </txp:if_category>
 </txp:custom_article>
</txp:section_category>
 </ul>
  </li>
</div>
</div>

But now the category links works only when you click on it.
Can it be that category_list does this ?

Roelof

Offline

#10 2008-11-25 16:50:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: how to change my template's so this menu appears

What is the html output?

Offline

#11 2008-11-25 16:58:24

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

hoi Else,

The html output is :

<div class="pro_linedrop">
     <ul class="select">
<li class="line"><a href="http://test2.tamarawobben.nl/index.php?c=zwangerschap">zwangerschap</a>
<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
     <ul class="sub">
                   <li class="subline">
                      <a href="http://test2.tamarawobben.nl/?c=zwangerschap&amp;month=2005-02">februari</a>
                    </li>
                    <li class="subline">
                      <a href="http://test2.tamarawobben.nl/?c=zwangerschap&amp;month=2005-03">maart</a>
                    </li>
                    <li class="subline">
                      <a href="http://test2.tamarawobben.nl/?c=zwangerschap&amp;month=2005-04">april</a>
                    </li>
</ul>
</div>

Roelof

Offline

#12 2008-11-26 10:54:35

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: how to change my template's so this menu appears

Hoi Els,

After several comparing the html code, i found the problem.
This rule

<a href="http://test2.tamarawobben.nl/index.php?c=zwangerschap">zwangerschap</a>

must become :

<a href="http://test2.tamarawobben.nl/index.php?c=zwangerschap">zwangerschap

then everything will work good.

Do i have to hack something or is there a simpler way to achieve this ?

Roelof

Offline

Board footer

Powered by FluxBB