Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2011-03-17 13:08:41

kstewart
Member
Registered: 2011-03-09
Posts: 71
Website

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

#38 2011-03-17 13:23:40

kstewart
Member
Registered: 2011-03-09
Posts: 71
Website

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,302

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

#40 2011-03-17 13:32:08

kstewart
Member
Registered: 2011-03-09
Posts: 71
Website

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

#41 2011-03-17 13:34:36

kstewart
Member
Registered: 2011-03-09
Posts: 71
Website

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,302

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

#43 2011-03-17 13:55:35

kstewart
Member
Registered: 2011-03-09
Posts: 71
Website

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

#44 2011-03-17 14:02:08

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

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.

  1. 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).
  2. 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.
  3. 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

#45 2011-03-17 14:04:46

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

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

#46 2011-03-17 14:14:56

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Articles not displaying, sections blank, slideshow not working, etc...

kstewart wrote:

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/

It ought not :)

the <img> tag is straight html. What it wants with the src attribute is a url. This can be a full url (http://your_web_site.com/image/image_name.jpg) or relative (image/image_name.jpg).

Txp relates to the <img> tag in one of two ways (basically – I won’t rule out some really creative adaptions people have come up with ;-D )

You can use a Txp tag like <txp:article_image> which will create the <img> tag with the url set, or in certain cases you might have reason to do it as <img src=”<txp:tag>” where the tag is something appropriate to the application.

<txp:txp: is . . . . . nothing. not a tag. not part of the url. It has no function.

Last edited by maverick (2011-03-17 14:15:43)

Offline

#47 2011-03-17 14:15:21

kstewart
Member
Registered: 2011-03-09
Posts: 71
Website

Re: Articles not displaying, sections blank, slideshow not working, etc...

Maverick – cheers, was trying to get my head round all these tags… I’ve done some basic dreamweaver sites so know a bit of CSS and html but didn’t quite know how to apply it in textpattern. You’ve made it all a bit clearer, thanks!


www.kimstewart.co.uk

Offline

#48 2011-03-17 14:19:22

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Articles not displaying, sections blank, slideshow not working, etc...

Glad it helped.

Also – just a reminder in case it comes up – you can reuse a class as many times as you wish in a single html document, but ids should only appear once per document. :)

edit: Dreamweaver was my initial tool of choice as well – more years ago than I care to admin. ;) Then I decided to get a better grasp of html and css and hand coded for a while. I found I could create much nicer code than Dreamweaver (@ least that version of Dreamweaver), and do it about as fast and sometimes faster. There are some excellent tutorials available for free online should you ever want to go deeper. Just ask, and I’m sure you’ll get some great recommendations from the community here.

Last edited by maverick (2011-03-17 14:24:21)

Offline

Board footer

Powered by FluxBB