Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-06-12 16:37:41

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,731
Website

Re: 3 dif. questions about; sorting, time & author, htaccess

With smart quotes colak just meant they have to be straight quotes not 66-99 quotes for code. I think it’s just a display issue in your screenshot that makes them look a bit like that.

In your example above you have two separate txp:article tags right below each other, but you can use the two attributes listform and form together in the same tag. txp:article is context-sensitive so it will show the listform on a list page and the normal form on an individual article page, e.g.

<txp:article limit="5" form="my_individual_article_form" listform="my_article_listing_form" />

Regarding moving directories: In the config.php you just need to change $txpcfg['txpath'] = 'my/new/path/with/just/one/textpattern';, in the prefs you will need to change the paths in the advanced settings. Check the diagnostics too to see if you haven’t overlooked something.
Whether other things break depend on how you’ve coded the rest of your site. It’s always good practice to use relative links or <txp:site_url /> so that if you change location you just need to change the settings and everything is linked correctly. If you’ve hard-coded any links or paths to image or css urls with the extra /textpattern directory in it, you’ll need to correct those too to make sure everything works.


TXP Builders – finely-crafted code, design and txp

Offline

#14 2009-06-13 04:59:10

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: 3 dif. questions about; sorting, time & author, htaccess

feytus wrote:

I think I may have overwritten the default template. But I just move thed <txp:article listform=“notime” limit=“5” /> to before the if_category tag, and it seems to work. Edit: Hmm, actually, that fucked it up a bit. But removing the whole if_category part and everything in it seems to have been working, hehe.

If you want to see the default template as it is on a new installation, TextBook has all the default pages.

Removing the entire if_category block wouldn’t work, because it includes the <txp:else /> block that covers everything other than articles by category: search, plus the basic article tag. But it sounds as though you’ve got that worked out. If this is your home page, just be aware of the need to cover search results, articles by category, and standard article lists.


Code is topiary

Offline

#15 2009-06-14 19:22:07

feytus
Member
Registered: 2009-06-02
Posts: 43

Re: 3 dif. questions about; sorting, time & author, htaccess

Moving textpattern worked a charm! Had a little scare because everything looked fucked up, but just needed to change “URL to site” or something in prefs, and it was fine. Thanks a lot for all the help you guys, I’m getting closer and closer to a launch here much thanks to you! :)

Offline

Board footer

Powered by FluxBB