Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-03-08 16:23:50
- jws
- New Member
- Registered: 2006-03-08
- Posts: 4
Need help understanding URL dispatching
Not quite understanding how sections & pages relate to urls.
If we ignore mod_rewrite and clean urls for a moment, how do I refer to pages or sections(with their default pages) in the url? I am finding it baffling hard to find this information. Perhaps I do not have the magic words to search for.
I would find a narrative description of the following url request helpful-
http://my.site.com/index.php?id=42
For example-
“The parameter portion of this url(id=42) indicates a request for SECTION 42, which returns it’s default PAGE. “
Offline
Re: Need help understanding URL dispatching
Most on these URL can be generated by TXP, using the appropriate tags. What are you trying to achieve ?
Offline
Re: Need help understanding URL dispatching
Assuming messy URL’s only, and shamelessly copying from the example above:
<pre>http://example.com/
http://example.com/index.php</pre>
Both of these URL’s refer to the “default” section of your site, the home page.
<pre>http://example.com/index.php?s=about</pre>
The parameter portion of this URL (s=about) indicates a request for the section “about” and returns the article list (i.e. front page) of that section. The display of the article list is controlled through the use of template tags (particularly <a href=“http://textpattern.net/wiki/index.php?title=Txp:if_article_list”>txp:if_article_list /</a>) and other choices made in the presentation —> organize tab.
<pre>http://example.com/index.php?c=politics</pre>
The parameter portion of this URL (c=politics) indicates a request for the category “politics” and returns a display of all articles (in all sections that have articles set “on the front page?” to yes) that use that category, regardless of whether category1 or category2 was used.
<pre>http://example.com/index.php?id=76</pre>
This URL refers to the permanent address (i.e., permalink) of article number 76. All permalinks use this format, regardless of the categories and section used.
Last edited by Elenita (2006-03-09 02:38:33)
Offline
#4 2006-03-16 20:24:55
- Moat
- Member
- Registered: 2006-03-11
- Posts: 21
Re: Need help understanding URL dispatching
I use cool urls and the page with list of articles in category has url domain.com/category/name-of-category. Could you tell me how can I get url domain.com/name-of-category?
Offline
#5 2006-03-16 20:46:58
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Need help understanding URL dispatching
Not out of the box. But you should be able to achieve this with the plugin sgb_url_handler.
Offline
#6 2006-03-17 23:34:47
- Moat
- Member
- Registered: 2006-03-11
- Posts: 21
Re: Need help understanding URL dispatching
Uhm.. I’m really sorry but could you tell me what should I do after installing it? I can’t find it anywhere…
Offline
#7 2006-03-18 00:36:24
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Need help understanding URL dispatching
Read the help documentation that accompanies the plugin (“help”).
Offline
Pages: 1