Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-10-19 15:56:18
- nix0rs
- New Member
- Registered: 2010-10-19
- Posts: 4
seperate Articles expandable menu
Hey guys! I need a little help here, I couldn’t find any answers here.
I have a fresh install of Textpattern, and one thing that bugs me because I can’t figure out how to change it is Articles menu link, when you click it, it expands and shows couple latest articles. I want to make Articles menu link non expandable and fetch those ‘recent articles’ and have them sitting by them selves.
example;
this is how it is:
Home
About
Contact
Articles (when clicked)
-article 1
-article 2
-article 3
this is what I need
Home
About
Contact
Articles (doesnt expand when clicked)
Recent: (non clickable)
-article 1
-article 2
-article 3
In advance, thank you! :)
Offline
#2 2010-10-19 16:52:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: seperate Articles expandable menu
This is the code generating the section menu:
<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li">
<txp:if_section name='<txp:section />'>»</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>›</txp:if_article_id>
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
</txp:if_section>
</txp:section_list>
Take out this part:
<txp:if_section name='<txp:section />'>
<txp:article_custom section='<txp:section />' wraptag="ul" break="li">
<txp:if_article_id>›</txp:if_article_id>
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
</txp:if_section>
You can use that as your article list, or simplify it a bit more:
<txp:article_custom wraptag="ul" break="li">
<txp:title />
</txp:article_custom>
Last edited by els (2010-10-19 20:34:41)
Offline
#3 2010-10-19 17:22:18
- nix0rs
- New Member
- Registered: 2010-10-19
- Posts: 4
Re: seperate Articles expandable menu
@Els, It completely removes the menu for some reason, but listing ‘recent posts’ works great. How can edit the font size of those by the way?
Thanks :)
Offline
#4 2010-10-19 18:19:27
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: seperate Articles expandable menu
nix0rs wrote:
@Els, It completely removes the menu for some reason
You probably did it too fast and deleted the section tag and the current section index part with »
altogether.
You should have this:
<txp:section_list exclude="nieuwsbrief" default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li">
<txp:if_section name='<txp:section />'>»</txp:if_section>
<txp:section link="1" title="1" />
</txp:section_list>
Font sizes can be edited in Presentation > Styles.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#5 2010-10-19 20:35:43
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: seperate Articles expandable menu
Hehe, I see I left something in there: exclude="nieuwsbrief"
of course doesn’t belong in the default code, sorry about that ;)
Offline
#6 2010-10-19 20:39:43
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: seperate Articles expandable menu
But it probably won’t hurt either :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#7 2010-10-20 22:49:44
- nix0rs
- New Member
- Registered: 2010-10-19
- Posts: 4
Re: seperate Articles expandable menu
Yeap sorry my bad, I am just new to this code but thats not an excuse :P
Everything works great, thanks guys :)
Last edited by nix0rs (2010-10-20 22:50:03)
Offline
Pages: 1