Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-04-22 09:24:47

uroko
New Member
Registered: 2010-04-19
Posts: 3

Incorporating Textpattern in static pages

I have an existing website with links, embedded video, etc … many pages. I wanted to replace my static article pages with a CMS and chose Textpattern. I am still learning how to use it, but thought I would try embedding it (incorporating, including) the Textpattern CMS (where I will henceforth write all my articles) in one of my static pages. Can’t figure out how. Searched the web, nothing about doing any such thing.

Is this possible? Surely many would like to use Textpattern this way (?). Does everyone just completely re-write their entire website inside of the Textpattern platform?

BTW, I did try the <!—#include virtual=“http://myurl.com/textpattern/”—> includes code – it didn’t work.

Thanks to anyone who can enlighten me here …

- Uroko

Offline

#2 2010-04-22 12:12:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,251
Website GitHub Mastodon Twitter

Re: Incorporating Textpattern in static pages

rah_external should be of use to you.

ps. If your static pages have an html instead of a php extension, no txp content will be parsed unless you write a specific htaccess rule to treat them as php.

Last edited by colak (2010-04-22 13:15:19)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2010-04-22 17:26:59

uroko
New Member
Registered: 2010-04-19
Posts: 3

Re: Incorporating Textpattern in static pages

Thanx. That thread reads like Chinese to me, but I’ll keep trying things. How does one “write a specific htaccess rule to treat them as php”? What’s htaccess? What’s “rah”? …I can barely write html code. Maybe I should be using Wordpress? Something simple for idiots like me? I just want a blog to add to my site.

Offline

#4 2010-04-22 18:45:12

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,000
Website GitHub

Re: Incorporating Textpattern in static pages

Rather than embedding textpattern inside another page, try setting it up in a subdirectory of your site, e.g. in /blog/.

Most people use textpattern to manage their homepage but you can use it to manage certain parts of your homepage such as just the blog section, etc. You can have other parts of your homepage exist alongside textpattern but it’s best to assign textpattern a subdirectory of its own or alternatively to use it for your main homepage and have other static content in subdirectories or files alongside it.

Because links within textpattern always direct to index.php it will break out of any static html file you try and include it in. Yiannis’ suggestion to use rah_exernal (that’s a plugin, the rah is the prefix the plugin author uses) allows you to include a certain snippet of content generated by textpattern in another file (an example might be to show a menu generated by textpattern inside another file) but it’s not suitable for running an entire textpattern installation inside another file.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2010-04-22 18:52:31

uroko
New Member
Registered: 2010-04-19
Posts: 3

Re: Incorporating Textpattern in static pages

Thanks Jakob, very helpful

Offline

Board footer

Powered by FluxBB