Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-12 03:49:48

marcusyoungdog
New Member
Registered: 2007-01-19
Posts: 9

url-only title tag or url mode

I have tried all of the suggestions in this post to no avail – none of them seem to work for me, so I am asking here…

how to I get the url-only title for an article? I am using section/title for my url mode, so permlink doesn’t work for me.

alternately, is there a url mode that will give me /section/url-only title, instead of section/title? that would be ideal…

Last edited by marcusyoungdog (2007-02-12 04:16:17)

Offline

#2 2007-02-12 22:15:45

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: url-only title tag or url mode

I don’t understand? url mode section/title does give you url’s like /section/url-only-title… So I suppose I am misunderstanding you.

Offline

#3 2007-02-13 00:03:34

marcusyoungdog
New Member
Registered: 2007-01-19
Posts: 9

Re: url-only title tag or url mode

no, it doesn’t. for example:

section called: “food”
article called “Delicious Cheesy Nachos”
url-only title: “delicious-cheesy-nachos”

permlink: “food/Delicious Cheesy Nachos” or “food/Delicious%20Cheesy%20Nachos”

section/title literally gives you the section and the title. which really sucks, since I would like to be able to use <code><txp:title /></code> or even <txp:url_title /> (which doesn’t work at all) not only for navigation purposes, but to generate css classes, etc.

Last edited by marcusyoungdog (2007-02-13 00:06:10)

Offline

#4 2007-02-13 10:26:32

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: url-only title tag or url mode

It shouldn’t do this. I’m going to move this thread to Troubleshooting.

Offline

#5 2007-02-13 17:47:40

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: url-only title tag or url mode

Diagnostics results and tag trace please.

Offline

#6 2007-02-14 00:24:24

marcusyoungdog
New Member
Registered: 2007-01-19
Posts: 9

Re: url-only title tag or url mode

Diagnostics:

Textpattern version: 4.0.4 (r1956)
Last Update: 2007-01-26 23:44:39/2007-01-26 23:34:05
Document root: /home/.sites/130/site157/web
$path_to_site: /home/.sites/130/site157/web
Textpattern path: /home/.sites/130/site157/web/textpattern
Permanent link mode: section_title
Temporary directory path: /tmp
PHP version: 4.4.4
Register globals: 1
Server Local Time: 2007-02-13 18:23:17
MySQL: 4.1.22-standard
Locale: en_GB.UTF-8
Server: Apache
Apache version: Apache
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Linux 2.6.9-42.0.3.blacksunsmp
Active plugins: ajw_if_preview-0.3, ajw_if_comment_owner-0.3.1, ajw_comment_alt-0.3, czg_if_comment_cookies-0.1, hak_textile_tags-0.1.1, pap_contact_cleaner-0.1, zem_contact_reborn-4.0.3.18, zem_contact_lang-4.0.3.5, rss_thumbpop-0.7, rss_admin_db_manager-4.3, rss_unlimited_categories-0.7.2, rss_admin_show_adv_opts-0.3, ajw_keyword_extract-0.3, rss_live_search-0.7, zem_link-0.3, zem_article_info-0.2, asy_wondertag-0.5

Pre-flight check:
————————————
/home/.sites/130/site157/web/textpattern/setup/ still exists
Some Textpattern files have been modified: /include/txp_prefs.php, /publish/taghandlers.php
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: system, shell_exec
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

————————————

Tag Trace:

<!— Runtime: 0.0567 —>
<!— Query time: 0.013434 —>
<!— Queries: 24 —>
<!— Memory: 2798Kb, <txp:text item=“comment_name” /> —>
<!— txp tag trace:
[SQL (0.000170): select name from txp_lang where lang=‘en-gb’ limit 1]
[SQL (0.001452): select name, data from txp_lang where lang=‘en-gb’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0.002789): select name, code, version from txp_plugin where status = 1]
[SQL (0.000699): select ID,Section from textpattern where url_title like ‘opr-restoration-1’ AND Section=‘volunteer_view’ and Status >= 4 limit 1]
[SQL (0.000171): select ID,Section from textpattern where url_title like ‘opr-restoration-1’ AND Section=‘volunteer_view’ and Status >= 4 limit 1]
[SQL (0.000176): select * from txp_section where name = ‘volunteer_view’ limit 1]
[SQL (0.000808): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=41 and Status = 4]
[article 41]
[SQL (0.000833): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where Posted > ’2007-02-11 17:10:10’ and Section = ‘volunteer_view’ and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000710): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where Posted < ’2007-02-11 17:10:10’ and Section = ‘volunteer_view’ and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000649): select host from txp_log where ip=‘154.5.17.77’ limit 1]
[SQL (0.000527): insert into txp_log set `time`=now(),page=’/volunteer_view/opr-restoration-1’,ip=‘154.5.17.77’,host=‘d154-5-17-77.bchsia.telus.net’,refer=’‘,status=‘200’,method=‘GET’]
[SQL (0.000174): select user_html from txp_page where name=‘volunteer’]
[Page: volunteer]
<txp:page_title/> [SQL (0.000159): select title from txp_section where name=‘volunteer_view’] [SQL (0.000433): select Title from textpattern where ID = 41]
<txp:feed_link flavor=“atom” format=“link” label=“Atom” />
<txp:feed_link flavor=“rss” format=“link” label=“RSS” />
<txp:css format=“link” />
<txp:rss_live_search_js/>
<txp:output_form form=“header” /> [SQL (0.000172): select Form from txp_form where name=‘header’] [Form: header] <txp:if_section> [<txp:if_section>: false] </txp:if_section> <txp:if_section name=“portfolio, portfolio_view_posters, portfolio_posters, portfolio_view_illustration, portfolio_illustration, portfolio_view_web, portfolio_web, portfolio_view_identity, portfolio_identity”> [<txp:if_section name=“portfolio, portfolio_view_posters, portfolio_posters, portfolio_view_illustration, portfolio_illustration, portfolio_view_web, portfolio_web, portfolio_view_identity, portfolio_identity”>: false] </txp:if_section> <txp:if_section name=“about”> [<txp:if_section name=“about”>: false] </txp:if_section> <txp:if_section name=“contact”> [<txp:if_section name=“contact”>: false] </txp:if_section>
<txp:article limit=“1” form=“volunteer” /> [SQL (0.000833): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 41 and Status = 4 limit 1] [article 41] [SQL (0.000167): select Form from txp_form where name=‘volunteer’] [Form: volunteer] <txp:permlink> <txp:title/> </txp:permlink> <txp:posted/> <txp:body/> <txp:comments_invite class=“comments-invite” showcount=“1” /> [SQL (0.000181): select Form from txp_form where name=‘comments_display’] [Form: comments_display] <txp:comments_invite textonly=“1” showalways=“1” showcount=“0” /> <txp:comments/> [SQL (0.000190): select Form from txp_form where name=‘comments’] [Form: comments] [SQL (0.000181): select *, unix_timestamp(posted) as time from txp_discuss where parentid=41 and visible=1 order by posted asc] <txp:if_comments_preview> [<txp:if_comments_preview>: false] </txp:if_comments_preview> <txp:if_comments_allowed> [<txp:if_comments_allowed>: true] <txp:comments_form/> [SQL (0.000189): select Form from txp_form where `name` = ‘comment_form’ limit 1] <txp:comments_error wraptag=“ul” break=“li” /> <txp:if_cookie> </txp:if_cookie> <txp:if_no_cookie> <txp:text item=“comment_name” /> <txp:text item=“Email Address” /> <txp:text item=“comment_web” /> <txp:hak_textile_tag/> <txp:text item=“comment_message” /> </txp:if_no_cookie> </txp:if_comments_allowed>
<txp:output_form form=“sidebar” /> [SQL (0.000196): select Form from txp_form where name=‘sidebar’] [Form: sidebar] <txp:rss_live_search label=“LIVE SEARCH “/>
<txp:output_form form=“footer” /> [SQL (0.000157): select Form from txp_form where name=‘footer’] [Form: footer]
[ ~~~ secondpass ~~~ ] —>

Last edited by marcusyoungdog (2007-02-14 00:24:56)

Offline

#7 2007-02-14 02:16:21

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: url-only title tag or url mode

Your taghandlers.php file has been modified. If you restore it, does that change things?

Offline

#8 2007-02-14 02:31:49

marcusyoungdog
New Member
Registered: 2007-01-19
Posts: 9

Re: url-only title tag or url mode

no. the only modification that I did was the one els recommended here

if you add this
<code>
function url_title($atts)
{ global $thisarticle;
return $thisarticle[‘url_title’]; }
</code>
to taghandlers.php, you’ve got a tag <code><txp:url_title /></code>

I rolled back to the original taghandlers.php and nothing has changed.

Offline

Board footer

Powered by FluxBB