Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-03-13 21:08:16
- el3ctro
- New Member
- Registered: 2011-03-13
- Posts: 2
Renaming the index.php to integrate to pre-existing site.
Hi, I was trying my best to search pre-existing threads to see if this one has already been covered, but im not sure it has been discussed lately.
So I have textpattern installed and I basically created my own “Theme” by inserting all of my pre-existing HTML code from an old page. I’m trying to give the old HTML design a real php news system. So I tried to rename the main index.php file to news.php. Now it is giving me errors and the style sheet does not appear proper.
tag error: <txp:css n=“default” format=“link” /> -> Textpattern Notice: n attribute is deprecated on line 63
Secondly, it is displaying a 404 Not Found error! Why is this?
So once again i’m just trying to integrate a news system into a preexisting HTML website using textpattern….
the page was working fine until i renamed index.php. Is there any way around this or any way I can get it to work with index.php named as news.php ?
Last edited by el3ctro (2011-03-13 21:09:32)
Offline
#2 2011-03-13 22:17:49
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Renaming the index.php to integrate to pre-existing site.
No, you can’t rename index.php.
A couple of possible ways to do this:So once again i’m just trying to integrate a news system into a preexisting HTML website using textpattern….
- Keep your static site and create a subdirectory ‘news’ and install Txp there.
- Use Txp for the entire site and create a section ‘news’ where you put your news articles.
In both cases the news section’s URL would be site.com/news/; in the first situation it would be the root of your Txp install, and in the second a section in your Txp install.
Here are a couple of FAQs regarding mixing static and dynamic content:tag error: <txp:css n=“default” format=“link” /> -> Textpattern Notice: n attribute is deprecated on line 63
The attribute n
was changed to name
recently. You will find the tag on the page template(s), just replace n
with name
.
Offline
#3 2011-03-13 23:17:10
- el3ctro
- New Member
- Registered: 2011-03-13
- Posts: 2
Re: Renaming the index.php to integrate to pre-existing site.
Thank you for your quick response. I will try your suggestion. I was trying to write my own php file and include(“index.php”); but that was not working. going to just link it to the site.com/news/
Thanks again !
Offline
Re: Renaming the index.php to integrate to pre-existing site.
I’d use txp for your whole site and just add a redirect in your htaccess from old pages to new pages.
Never rename index.php
So following on with the examples above – add this to to your htaccess file:
redirect 301 /news.php http://site.com/news
And so on with any other pages which need a redirect from old to new
Offline