Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-06-12 09:45:21
- feytus
- Member
- Registered: 2009-06-02
- Posts: 43
3 dif. questions about; sorting, time & author, htaccess
Hey again people! I seem to have been spamming you a lot recently, and I’m sorry for that, but you are such a helpful lot to a poor unwise feller as myself. So! 3 more! You can do it! :)
1) how can I sort the links in my navigation bar? first off all, how can I change the order of the sections in the navigation bar? and after that, how can I sort the collapsed menu showing all the articles under each section? I need to sort this alphabetically.
2) how can I remove the author signature and the time posted from certain articles (like the “about”-page, and other static pages)?
3) is there a way for me to “mask” the URL of my site with htaccess or some other thing? I just think it would look better esthetically if my “textpattern” folder wasn’t viewable in the URL. my URL as it stands like now look like this;
www.fish.com/textpattern/index.php
www.fish.com/textpattern/section/article.php
is there a way to make it look like this in the browsers;
www.fish.com/index
www.fish.com/section/article.php
Woa, that’s quite a few questions. I’ve tried searching on the forum for all of these, but the search engine output is always extremely confusing to me.
Any suggestions on any of these would be much appreciated! You’ll all get a big head up once my site launches! Hehe. :)
Offline
Re: 3 dif. questions about; sorting, time & author, htaccess
1) Assuming your have set up your different areas as sections, see txp:section_list. There are lots of different ways of setting up navigation systems – for a section list with articles check some of the tutorials in txptips, for example this one.
2) Your txp:article tag will likely have an attribute listform="mylistform"
which is used for the short form listing on an article list page. Go into the forms tab, find mylistform (or whatever you have called it, or the default if you had not explicitly specified a listform) and copy the code. Make a new form of type article with a new name and paste in the copied code. Now remove the tags txp:author
and txp:posted
from that code (those are the bits that display the author and date) and save your new form. Make a note of its name and go back to your page template and change the attribute listform="mynewlistform"
to match the name of your new form. If you are using the same page template for several different sections and only want this display to apply to some of the sections, see txp:if_section to apply that only for specific sections.
3) What you suggest is the standard setup. My guess is that you installed it in a subdirectory called /textpattern
(your admin area is therefore in /textpattern/textpattern/). If that is so, move your entire installation back down a level to the root directory and update the config.php and admin preferences to reflect that change. Also textpattern does not add .php to the end of each link (I think you have it confused with something else here). Clean urls always look like mysite.com/section/article
(depending on your admin prefs setting).
but the search engine output is always extremely confusing to me
Try using use search in the menu bar (the advanced search) – that gives you only the threads, if you use search at the top-right of the forum you get each comment.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2009-06-12 13:42:20
- feytus
- Member
- Registered: 2009-06-02
- Posts: 43
Re: 3 dif. questions about; sorting, time & author, htaccess
Sweet, thanks! Number 1 worked nicely, thanks!
Number 2, I don’t really know why it doesn’t work. I made a new form, called it “notimeauthor”, previewed it, and it looked to be working nice. I went into the default article page, copied it, named it “noauthortime”, and replaced <txp:article form=“article_listing” limit=“5” /> with <txp:article form=“noauthortime” limit=“5” />, went into the section part, and told the about-section to use the “noauthortime” page, saved it. But when refreshing the about page, it still displays date and author. Strange!
Number 3; is that really all I have to do to move it? Update the config.php and prefrences after moving? Just want to be certain before I do something potentially fatal for the site, hehe. The php thing was just a bad example from me.
Many thanks for your help, man. :)
Offline
Re: 3 dif. questions about; sorting, time & author, htaccess
hi feytus
There is a difference in form
and listform
The textbook states
form="form name"
Use specified form.
Default: default.
listform="form name"
Use specified form when page is displaying an article list.
would that be the problem?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: 3 dif. questions about; sorting, time & author, htaccess
feytus wrote:
I made a new form, called it “notimeauthor”, previewed it, and it looked to be working nice. I went into the default article page, copied it, named it “noauthortime”, and replaced <txp:article form=“article_listing” limit=“5” /> with <txp:article form=“noauthortime” limit=“5” />, went into the section part, and told the about-section to use the “noauthortime” page, saved it. But when refreshing the about page, it still displays date and author. Strange!
I’m surprised it displayed anything (other than an error message), if I read you correctly. Your noauthortime
page calls an article form named noauthortime
, but the form you made is named notimeauthor
. Is that correct?
Code is topiary
Offline
#6 2009-06-12 14:13:24
- feytus
- Member
- Registered: 2009-06-02
- Posts: 43
Re: 3 dif. questions about; sorting, time & author, htaccess
Hehe, I just mixed it up when writing the post. I did put the correct form name in the page.
So, instead of calling for a form, I should be calling for a listform, yes? Which means I could just replace <txp:article form=“notimeauthor” limit=“5” /> with <txp:article listform=“notimeauthor” limit=“5” /> ? I just tried and it didn’t really do anything either. Yet again though, when clicking “preview” from the forms-menu, it shows my main page with no author and no posted date. And yes, I have checked several times that the form I am calling is in fact the correct one. ;)
Offline
Re: 3 dif. questions about; sorting, time & author, htaccess
feytus wrote:
So, instead of calling for a form, I should be calling for a listform, yes?
If you don’t specify listform
, it will default to the same as form
. So you don’t need to use listform
unless you want different forms for single articles and lists.
Are you sure that you are editing the correct <txp:article />
tag? There are a few of them on the default page of a new Txp install.
Last edited by jsoo (2009-06-12 14:19:09)
Code is topiary
Offline
#8 2009-06-12 14:29:07
- feytus
- Member
- Registered: 2009-06-02
- Posts: 43
Re: 3 dif. questions about; sorting, time & author, htaccess
Here’s an image showing all the different things;
If you want to see the output, check it;
http://www.marsmelons.com/textpattern/about/
The txp_article file I am editing was the only one from the defualt page that contained the word “form”. And yes, the page I am editing is the one called “about”. :)
Last edited by feytus (2009-06-12 14:30:43)
Offline
Re: 3 dif. questions about; sorting, time & author, htaccess
Are those ‘smart quotes’?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: 3 dif. questions about; sorting, time & author, htaccess
feytus: note that the <txp:article />
tag in the page you show is inside an if_category
conditional block. This is the article
tag that shows output on a page listing articles by category (i.e., a page with a URL such as http://www.example.com/category/foo
or http://www.example.com/index.php?c=foo
, depending on your URL mode).
Look for the article
tag below this; looks like <txp:article limit="5" />
in the default page of a fresh Txp installation.
Code is topiary
Offline
#11 2009-06-12 15:01:30
- feytus
- Member
- Registered: 2009-06-02
- Posts: 43
Re: 3 dif. questions about; sorting, time & author, htaccess
Smart quotes? I don’t know what you mean. If you mean they are copied from some web-text, no they are not, and they are not a double set of this ‘ , but a “ and a “. If that was what you meant. :)
Offline
#12 2009-06-12 15:07:08
- feytus
- Member
- Registered: 2009-06-02
- Posts: 43
Re: 3 dif. questions about; sorting, time & author, htaccess
jsoo wrote:
feytus: note that the
<txp:article />
tag in the page you show is inside anif_category
conditional block. This is thearticle
tag that shows output on a page listing articles by category (i.e., a page with a URL such ashttp://www.example.com/category/foo
orhttp://www.example.com/index.php?c=foo
, depending on your URL mode).
Look for the article
tag below this; looks like <txp:article limit="5" />
in the default page of a fresh Txp installation.
Ah, sweetness! 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.
Thanks a lot for the help you guys!
And are you really sure the only thing I have to do after moving is editing the config and the preferences? I’ve been working 12-14 hours every day on this project for the last couple of weeks, so it would suck bad if I fucked it up now. :)
Last edited by feytus (2009-06-12 15:14:38)
Offline