Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
most messy textpattern form ever....
I’m ashamed of myself because this is my most used form on my most visited personal website…
<div id="rowtwo" style="">
<div id="rowtwo-inner" style="">
<!--<txp:output_form form="livesearch-input" />--><div id="b" style="border:1px solid white; width:940px; background-color:#f1f1f1; margin:0 auto; display block; margin-top:50px;" >
<!--<div style="margin-top:-20px;">
<h2 style="font-size:13px;color:#f1f1f1;">Recent posts to the Photography Gallery</h2>
<div>--><div class="resize" style="border:0px solid pink; width:530px; float:left; padding:3px;">
<div id="slider" class="nivoSlider">
<txp:article_custom id="138" form="body" />
</div><h2 style="margin-top:.5em; font-family: Lucida Grande,verdana,arial,sans-serif; text-transform: uppercase; font-size:1.1em; margin-left:.5em; padding:0 0 5px 0;"><txp:article_custom id="138" form="titletwo" /></h2>
<span style="margin-left:.5em; margin-top:0; padding-top:0; display:block;"><txp:article_custom id="138" form="excerpt" /></span>
</div><div class="resize_text" style="border:0px solid pink; width:365px; float:left; margin-left:10px; marin-top:00px;">
<div style="margin-left:4px; border:0px solid orange;">
<h2 style="margin-top:13px; color:#ccc; font-family: Lucida Grande,verdana,arial,sans-serif; border:0px solid pink; text-transform: uppercase; font-size:14px; letter-spacing:.5; margin-left:30px; margin-bottom:0; padding:0;">Recent posts to the Photography Gallery</h2>
<ol id="thumbs" style="width:360px; border:0px solid orange; margin-left:15px; margin-top:0; padding-top:6px;">
<txp:article_custom allowoverride="1" form="home_list" limit="6" section="ireland-photographs" />
<li style=" display:block;"> </li>
</ol>
<div style="clear:both; width:600px; display:block;"> </div>
</div>
</div>
<div style="clear:both; width:600px; display:block;"> </div>
</div> <!-- end photo -->
<div class="recent_post" style="margin:0 auto; width:945px;">
<div style="border:0px solid orange; float:left; width:580px;">
<txp:article_custom allowoverride="1" limit="2" section="irish-photography-and-watercolor-painting-blog" category="blog" sort="Posted desc" form="blog_home" />
</div>
<div style="width:365px; border:0px solid white; float:left; padding:0;">
<txp:article_custom category="feature" limit="1" form="blog_feature" section="irish-photography-and-watercolor-painting-blog" />
</div>
<div style="clear:both; width:600px; display:block;"> </div>
</div><!-- end recent-->
</div> <!-- end rowtwo-inner-->
</div>
</div> <!-- end rowtwo-->
<div id="rowthree">
<div id="rowthree-inner" style="border:0">
<txp:output_form form="footer2" />
</div> <!-- end rowthree-inner -->
</div> <!-- end rowthree -->
its a bad hen that wont scratch itself.
photogallery
Offline
Re: most messy textpattern form ever....
i have issues…
its a bad hen that wont scratch itself.
photogallery
Offline
#3 2011-10-28 23:42:41
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: most messy textpattern form ever....
And what is the joke?
I can understand that you have problems with this … this what?
And you have a question or what is it about?
Offline
Re: most messy textpattern form ever....
there is no problem. just posting a really messy form. I guess it shows that for me textpattern is more about the content than the cms. maybe silly post… if so sorry for wasting your time.
its a bad hen that wont scratch itself.
photogallery
Offline
#5 2011-10-29 03:05:02
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: most messy textpattern form ever....
No, I don’t wasted time … I just want to know what is the idea of this post. Or I lack sense of humor?
Offline
Re: most messy textpattern form ever....
Maybe its ugly but it works! And that is a feature of TXP – the flexibility to do things the way we want!
Offline
#7 2011-10-29 06:39:11
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: most messy textpattern form ever....
Hi Kevin,
I think there’s a superfluous </div> in there (or not enough <div>) … if I auto indent the code it chucks a wobbly.
Adi
Offline
Re: most messy textpattern form ever....
Clear as mud! You might like to try cascader which strips out inline css from code and provides you with the css separately. It doesn’t remove all the mud from your boots and you have a couple of things in there like style attributes without content that it doesn’t spot, bit it’s not as aggressive as htmlpurifier so the txp tags survive. You still have some work to do after that before your boots shine but it may help …
TXP Builders – finely-crafted code, design and txp
Offline
Re: most messy textpattern form ever....
It’s messy because you made it messy, your choice, right? Without inline styles, with indentation and better markup structure such form would be very readable.
Anyways, um, you are calling the same article three times, using up to three (or more) times the resources than needed. You should use that article_custom
tag once, and work from there especially when the tags are just after each other. Like so:
<txp:article_custom id="138">
<div>
<txp:body />
</div>
<h2><txp:title /></h2>
<span>
<txp:excerpt />
</span>
</txp:article_custom>
Saves so many database queries.
Offline
Re: most messy textpattern form ever....
jstubbs thanks for your support of my bad habits!
Jakob, thanks , I will check out cascader. I have so many inline styles because soemtimes I get lazy to go back to my editor app – I just like to work in txp sometimes. Hmm maybe I should just start using the textpattern STYLE tab…actually maybe I should… I do most of the positioning tweaks in firebug. Wasn’t there some sort of ff extension that allowed you to save the css file right from firebug as well? If there was I would have less inline styles.
Adi thanks I think the superflous div may be from somewhere else in the page so when that form is in the page it’s all good, but i will check to make sure.
its a bad hen that wont scratch itself.
photogallery
Offline
Re: most messy textpattern form ever....
Gocom thanks a million for that. Well i don’t know if wanted messy but it just turned out that way. I will tidy everything up with all your suggestions…
its a bad hen that wont scratch itself.
photogallery
Offline
Re: most messy textpattern form ever....
cascader is awesome
its a bad hen that wont scratch itself.
photogallery
Offline