Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-11 11:54:03

mr.riff
Member
From: H-bad, India
Registered: 2006-01-11
Posts: 10
Website

There's so much I'd like to ask, so they're all bundled up in here :)

Hey, first post!

I’m sure I registered a while ago, but I’ve forgotten the email and the username that I used. A little background: I’ve been using textpattern for a little over a year, on various domains which are probably dead by now and I’ve only recently begun to ‘take it to the next level’ with my journal: http://itch.in.

I find myself using the following code quite often: <code><txp:php>echo $thisarticle[‘url_title’]; </txp:php></code>. Can we have it as an official textpattern tag in the next release? Like, <code><txp:url_title /></code>?

Here’s another bit of code that I use quite a bit: <code><txp:php> echo $thisarticle[‘article_image’]; </txp:php></code>. I’d just like the text that’s in the field, not an entire generated img tag. Eg: <code><txp:article_image generate=“0” /></code>. This complicates things and I realize I could just use a custom field, but I’m coming to that :)

How about displaying custom fields by id? Eg: <code><txp:custom_field id=“2” /></code> I often tweak my install quite a bit, changing the custom field names (I’m obsessed, I know) and having them work like this, by id, would simplify things. Oh, and a <code><txp:if_custom_field id=“3”></code> would be grand as well. My current work around is modification of rei_show_custom:

<code>function customfieldbyid($atts) {
global $thisarticle;
$id = $thisarticle[“thisid”];
$custom_field = “custom_”.$atts;
$res = safe_rows($custom_field, “textpattern”,“id=’$id’”);
$out = $res [0] [$custom_field];
return $out;
}</code>

And this is called by: <code><txp:php> echo customfieldbyid(3); </txp:php></code>.

And finally, how about a way to specify ‘Content-type’ headers for pages or sections? This also sounds like a rather complicated affair, but it can’t hurt to ask! :)

A P.S: Would be there be a way to turn off error handling on a section?

Now that I think of it, these all would be solved by very simple plugins, or rather, they should be. lol!


I’ve PIZZA.

Offline

Board footer

Powered by FluxBB