Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#31 2011-03-17 01:06:30
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: Articles not displaying, sections blank, slideshow not working, etc...
thebombsite wrote:
The page code is, forgive me, a complete mess.
Yup.
At the moment I’m focusing on what might cause the blank pages and try to leave small faults out when I can bear it, like e.g. width=”{width#1}” in an HTML image tag. That’s stuff I leave to kstewart.
I’m done now, should be displaying something.
Last edited by uli (2011-03-17 01:42:35)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
I know, and who has time for bed. ;)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#33 2011-03-17 02:26:33
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Articles not displaying, sections blank, slideshow not working, etc...
kstewart:
Muchacho, sit down and learn the basics …
Not only the HTML is a mess, also the CSS. And I have the impression that you copy and paste, without knowing what you do. As an example, the beginning, before the reset:
#head {float: left;}
* {
outline: 0;
padding: 0;
margin: 0;
border: 0;
}
html[xmlns] .clearfix {
display: block;
}
I can’t see the sense of it. And, other example, float: center; is part of CSS4.1 [ ;-) ] and no current browser parse it. Etc.
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
Kim
As you noted, you are new Txp, and maybe to coding for the web? Which is totally fine – we’ve all been there. It looks like you are struggling a bit with keeping your code lean, clean, and organized. And with some of the basics as well. Don’t worry – you’ll get it. :)
You can make comments in your html code by enclosing them like so: <!— your comments here —>
Stuart (thebombsite) illustrates a coding practice you might want to try until you get more sure of yourself. This will help you keep track of where you are in your code.
</div> <!— /#foot—>
</div> <!— /#container —>
Each time you open a division, especially if you have given an id or class, create a comment on the corresponding closing tag just to make sure you close it. You may want to get in the habit of creating your opening and closing div together and then adding content inside of it. That may help ensure you always have a matching div.
Another practice that might help, if you are not already using it, is to get a good text editor that can highlight (color code) your html tags. I personally like subethaedit, a lot of people use Textmate. Coda is a more advanced html editor. Sometimes developing your code as a whole page, then breaking it out to the forms, can be helpful, especially in the beginning when trying to get the big picture and track down problems.
In troubleshooting this case, one option might be to make a copy of everything, then clear it out and start from scratch. Create your basic structure first – html tags, head tags, body tags. Then add, say the basic navigation code and make sure it is working. Then add your footer code and make sure it is working. In other words, take it in small bits, and be very methodical.
fwiw – Just some thoughts that might help you get a handle on this problem and going forward.
Mike
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
I’ve decided to start again from scratch… it’s weird because I used the same page templates I downloaded online and it worked fine on my personal site: http://www.kimstewart.co.uk/textpattern-4.3.0/
Thanks guys. Stuart: Your page code got rid of all formatting, I had this in my CSS:
/* Floating */
.f-left {float: left;}
.f-right {float: right;}
.f-center {float: center;}
/* Text align */
.t-left {text-align: left;}
.t-center {text-align: center;}
.t-right {text-align: right;}
.va-middle {vertical-align:middle;}
so thought <div align=“f-center”> might work in the footer form?
www.kimstewart.co.uk
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
Can anyone recommend a decent template I can work from?
www.kimstewart.co.uk
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
one of these?
http://bertgarcia.org/txpide:start#hcg_templates
www.kimstewart.co.uk
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
Before deleting it all… I changed my permanent link mode in admin, preferences to messy and now my pages are working. However no articles are showing up…
www.kimstewart.co.uk
Offline
#39 2011-03-17 13:23:45
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: Articles not displaying, sections blank, slideshow not working, etc...
After reading through your forms for a good bit of my lifetime I’d have liked to see you at least try out the last finding (#28).
kstewart wrote:
it’s weird because I used the same page templates I downloaded online
You’ve not understood that editing something can change it fundamentally.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
I did do that… I really appreciate your time!
My gallery form now looks like this:
<txp:if_section name="Home" >
<div class="slideshow" id="slideshow1">
<img src="http://www.fonmedia.co.uk/images/{id#1}.jpg"
alt="{alt#1}" width="{width#1}” height=”{height#1}" />
</div>
</txp:if_section>
www.kimstewart.co.uk
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
However, the slideshow works this way:
<img src="<txp:txp:www.kimstewart/textpattern-4.3.0/images/{id#1}.jpg"
on my site http://www.kimstewart.co.uk/textpattern-4.3.0/
www.kimstewart.co.uk
Offline
#42 2011-03-17 13:43:34
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: Articles not displaying, sections blank, slideshow not working, etc...
kstewart wrote:
I did do that…
Sorry, you did not, see next line:
<img src="<txp:txp:www.kimstewart/textpattern-4.3.0/images/{id#1}.jpg"
Edit: Mixed up your domains. Nevertheless, <txp:txp: doesn’t work.
Last edited by uli (2011-03-17 13:55:30)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
I think there’s a bit of confusion between sites… the above double <txp:txp:…. works on my own site (kimstewart.co.uk.textpattern-4.3.0/) but on the site with all the issues (www.fonmedia.co.uk) I have the following for the gallery form:
<txp:if_section name="Home" >
<div class="slideshow" id="slideshow1">
<img src="http://www.fonmedia.co.uk/images/{id#1}.jpg"
alt="{alt#1}" width="{width#1}” height=”{height#1}" />
</div>
</txp:if_section>
www.kimstewart.co.uk
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
kstewart wrote:
so thought <div align=“f-center”> might work in the footer form?
Reasonable idea, but wrong strategy to get there :)
I apologize if I am covering basics you already know. However, just in case not, maybe this will help.
The cascading style sheets (css) were created to separate structure from presentation and content. With their advent, it became easy to change an entire website by just changing the style sheet.
There are three places css declarations can go.
- The preferred method is usually a separate file that ends in .css and is then linked to an html file in the <head></head> of the file. When working with Txp, that is in essence what Presentation -> CSS is doing – creating a separate style sheet (except in this case, the style sheet is in Txp’s database and created dynamically).
- Alternately, you can place css directly in the <head></head> of an html file itself. There is certain tags you use to open and close the section with css declarations in it.
- Lastly, there is a way to include css in an html tag itself (called inline css) and still validate. However, you defeat the separation of presentation and structure, and consequently you lose the ease of ability in controling your site’s appearance. I would say most good web developers avoid it when possible.
div is an html tag.
- In order to place css declarations as attributes in that tag, you would need to format it as style=“cssCeclaration: value; cssDeclaration: value;” However, again, I’d discourage you from doing this.
- Instead, the way to separate your css and achieve what you wanted is to set the css selector name.
- In this case, the css selector name would be .f-center. However, you don’t set it with align (that is part of a css declaration). Rather, the basic concept is this: when setting css selectors in a style declaration, selectors begining with a .(period) are a “class”. Selectors beginning with a #(number sign) are an “id”.
So you were close — but you had a hybrid between inline css and a separated css style sheet. That’s why it did not work. It should have been <div class=“f-center”.>
You did correctly leave off the period (the period and the number sign are only used when setting the css selector and definitions – not when calling the selector in an html document).
Last edited by maverick (2011-03-17 14:28:06)
Offline
Re: Articles not displaying, sections blank, slideshow not working, etc...
kstewart wrote:
<txp:txp:…. works on my own site
Someone correct me if I’m wrong, but to the best of my knowledge no tag exists that uses <txp:txp — thus it should never work. It should create some sort of glitch.
Last edited by maverick (2011-03-17 14:06:09)
Offline