Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-06-04 01:36:20

bjbarouch
New Member
Registered: 2016-06-04
Posts: 2

Integrate into existing site

I can’t find a concise guide anywhere for how to integrate Textpattern into an existing site. I don’t mean the easy stuff, like just installing it. I mean, given a site’s existing styling, how does one use the site’s existing page header and footer and general css-styling on a textpattern-powered blog within a given page of that existing site. Any help for this undoubtedly common task? Sorry if you all think this is obvious, or the the answer is easy to find. I have not found it.

Offline

#2 2016-06-04 02:02:48

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Integrate into existing site

At the most basic level, you log into the admin side of Textpattern. Click on “Presentation”. From the dropdown you see Sections, Pages, Forms, and CSS.

Pages does not actually mean a literal webpage, but rather it is the composite theme or template (html, txp tags, forms, css, etc) that you can apply to any individual page. Each Page is linked to a section.

Forms are optional but incredibly useful chucks of code that you call for use in your Pages. Think of them as building blocks. You might have a form for your header and another for your footer. You add forms to a Page Template viaTxp tags embedded in said Page.

CSS is pretty self-explanatory. You put your one or more cascading style sheets here. They are called into either a Page, or a form (say a form with your page head for example) using a Txp tag.

Your content is added using the options under the Content drop down, then called to the Page using Txp tags.

Does this help/make sense?

Last edited by maverick (2016-06-04 02:06:25)

Offline

#3 2016-06-04 02:51:12

bjbarouch
New Member
Registered: 2016-06-04
Posts: 2

Re: Integrate into existing site

Thanks for replying.

“Page” doesn’t mean page, even though it begins with <!DOCTYPE html> <html lang=”<txp:lang />”> <head> …
?

Here is the way I would like to be able to think of it. I have a page that already has the right <head> section, including my .css file, and from a content perspective, the <body> section already has the header, navigation, and footer common to all of my site’s pages. I want to insert a blog as the main content of that page. It should have the bakground the page already has, use the fonts the page already uses, style paragraphs and other lements the way they are already styled, …

I want Textpattern to provide functionality, embedded in a page that otherwise looks like all my other pages. What is the shortest path to that? If it’s “Pages”, what exactly do I throw out of and leave in the default template, and what exactly do I put into it if I already have my .css included? Is it just blank? This is so not self-explanatory :-( Thanks for your guidance.

Offline

#4 2016-06-04 04:20:15

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Integrate into existing site

What maverick meant was that a page is a page template, not an actual page. Technically you can create a new page/modify an existing one, copy your existing html in into it, and use your existing css externally – while Textpattern gives you the option of using the css facility, it is not required.

I don’t know exactly what you are going for but I assume you are trying to do something like create a blog in a subdirectory.

1. Create the subdirectory.
2. Install textpattern inside.
3. Navigate there and set it up.
4. At this point you have a working textpattern site but using the pre-installed templates.
5. What you want to do then is go to Presentation – Pages and make a backup copy of the existing Default page.
6. Try making changes to incorporate your existing design.
7. Repeat Step 6 as needed.
8. When you get confused by a Textpattern tag, you can refer to the Tag Reference
9. Feel free to ask more questions as needed.

Offline

#5 2016-06-04 10:35:21

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Integrate into existing site

michaelkpate wrote #299503:

What maverick meant was that a page is a page template, not an actual page.

Yes. I apologize for being unclear. Thank you Michael.

Offline

#6 2016-06-04 10:53:43

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Integrate into existing site

bjbarouch

I’m not sure if this will help, but on the chance it might:

One of the strengths of Textpattern is that it lets you pretty much do anything you want with the design of your side. To oversimplify – you create your site to look any way you want, then add txp tags for dynamic content – like a blog post.

Example:

- if you were to delete Textpattern’d default template, then copy the html for one of your prexisting website pages to Textpattern -> Presentation -> Pages, and make the url linking to your existing css was accurate, then Textpattern should output a page that looks exactly like the original page. It just would not have any dynamic content pull from Textpattern’s database because there are no Txp tags in your code.

As Michael clarified, what I was trying to communicate is that a Textpattern “Page” isn’t a single, static, website page.

Some CMSes are designed around a site map model. For every individual website page you can visit on the front side, there is a corresponding page on the administration side where you edit it.

CMSes like Textpattern use a different approach, and sometimes that can confuse newcomers, especially because of Textpattern’s use of the word “Page”. It progably would have been better if the word “Template” would have been used instead. One template, with txp tags, can output multiple website pages.

I apologize for making it more confusing.

Michael’s recommendation is spot on. Make a backup of the current Page’s default theme. Then start copying and pasting your current code into it until it looks the rest of your existing site. Link to your current existing css file.

Offline

Board footer

Powered by FluxBB