Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-09-29 09:48:30
- formed
- Member
- Registered: 2008-09-29
- Posts: 13
Using status="hidden" isn't displaying content.
So the situation is I have a small div in my header, that I want to be able to fill with a small amount of content (essentially a mini about-me next to my logo) that is generated from a hidden article. I’ve used the <txp article_custom> tag with the status=“hidden” attribute and the id pointing to the article, but it just won’t load the content. Though as soon as I set the article to live it works fine. Code I’m using below.
<txp:output_form form=“header” />
to pull my header into my page template.
<div id=“top_box”><p><txp:article_custom id=“9” form=“topboxbody” status=“hidden” /></p></div>
within the header form to grab the content from the hidden article.
<div=“entry-content”><txp:body /></div>
the form topboxbody to actually display the article.
I am just befuddled as to why it seems to work with live posts (even when I leave the status=“hidden” in the attributes.)
Last edited by formed (2008-09-29 09:48:50)
Offline
#2 2008-09-29 10:14:45
- formed
- Member
- Registered: 2008-09-29
- Posts: 13
Re: Using status="hidden" isn't displaying content.
Sigh at myself. Fixed it!
Note to self – search wins.
Offline
Re: Using status="hidden" isn't displaying content.
Hi!
How did you fixed it? (so if others have the same problem, they could give thanks to you ;)
Also, status=“hidden” isn’t meant to be used (there are some threads about this). Using “sticky” status wasn’t an option?
Offline
#4 2008-09-30 09:14:04
- formed
- Member
- Registered: 2008-09-29
- Posts: 13
Re: Using status="hidden" isn't displaying content.
Well, if I used sticky it would have shown up in the section in which I posted it no matter what (I assume). This could have been avoided by creating a section for internal type content and then hand-coding the menu, but I was hoping to use the dynamic menu in the hopes of easily adding sections to my site (mostly so I know how to do similar for client sites).
All I had to do was remove the id=“9” from my code, and just call any posts with status hidden. If this is going to cause me a nightmare further down the track – and there are some good alternatives to achieving the same goal – I would greatly appreciate input!
P.S. My 2nd night of fiddling with Txp (after Uni and before bed) and I am seriously starting to fall in love with this thing!
Edit to add: I realised I will probably hand-code the menu anyway for the sake of ordering my links.
Edit again: Also found out about the exclude tag whoops
Last edited by formed (2008-09-30 11:13:06)
Offline
#5 2008-09-30 16:27:18
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Using status="hidden" isn't displaying content.
formed wrote:
Well, if I used sticky it would have shown up in the section in which I posted it no matter what (I assume).
No, sticky articles only show up when you specifically call them with status="sticky"
in your article tag :)
Offline
#6 2008-10-01 04:10:53
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Using status="hidden" isn't displaying content.
formed wrote:
This could have been avoided by creating a section for internal type content and then hand-coding the menu, but I was hoping to use the dynamic menu in the hopes of easily adding sections to my site (mostly so I know how to do similar for client sites).
Edit to add: I realised I will probably hand-code the menu anyway for the sake of ordering my links.
Don’t know if this will help but my plugin adi_menu will generate menus based on sections. There’re sort options as well. Also, I’m about to release a new version which will list articles in the menu as well.
Offline
#7 2008-10-02 21:21:58
- formed
- Member
- Registered: 2008-09-29
- Posts: 13
Re: Using status="hidden" isn't displaying content.
That sounds really cool Adi, pretty much exactly what I need!
Offline