Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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 &lt;txp:thisPage /&gt; 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

#2 2005-04-05 20:41:34

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

Board footer

Powered by FluxBB