Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-04-05 18:32:31
- SteveC
- New Member
- Registered: 2004-11-06
- Posts: 9
Better static page management idea
<pre>
function ifp ($atts, $thing) {
$p2 = $atts[‘p’];
$p = (isset($_GET[‘p’])) ? $_GET[‘p’] : ‘default’;
return ($p2 == $p) ? $thing : ‘’;
}
function thisPage($atts) {
global $s;
$p = (isset($_GET[‘p’])) ? $_GET[‘p’] : ‘default’;
return implode(‘’, file(‘pages/’ . $s . ‘/’ . $p . ‘.php’));
}
</pre>
Well, that’s the idea anyway, it works for me quite well, basically just an if_Section plugin can detect an about section and then you can call a page with <txp:thisPage />
Better than articles IMO. although an admin side hack <ins>plugin</ins> to make it work from the databse might be better.
Anyway, there she blows!
Offline
Re: Better static page management idea
Does this require you have an actual file for the page?
I think something like WP’s pages functionality could be pretty nice. That way you wouldn’t need a bunch of 1 article sections.
Shoving is the answer – pusher robot
Offline
#3 2005-04-08 14:33:02
- SteveC
- New Member
- Registered: 2004-11-06
- Posts: 9
Re: Better static page management idea
It requires a file, but I think that is better for static pages as they are rarely updated. You can also hack it abit so that they get parsed by Textile.
Offline
Pages: 1