Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-02-14 22:00:40

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Nested tags to get very compact <txp /> code

Thank you Els. It works very good. I’ve already changed the name of my index-articles. The only problem is that my web site contains again some static menu and now I need to manually change some URLs. For this reason I wonder about which is, in your mind, the most strange aspect in my web-site, so that I modify it.

When I transfered all the articles in TextPattern CMS I tried to mantain old names and it worked. All of the files of my web site are ‘.html’, but really I don’t know if the server automatically convert them in ‘.php’, or if they are ‘.php’ files, but their name ends in ‘.html’ .
What I noted is that in ‘.htaccess’ there is a string ‘#DirectoryIndex index.php index.html’ and I thought it means that files could be also ‘.html’ .
I don’t know these aspects because I don’t know anything about php.

I tell you all this because, assuming that now I’m changing my directory index file-names, so there is no problem in converting all these names in index.php (but the other will remain ‘.html’ ). :-)
Do you think it could be useful?

Last edited by Bongo-man (2011-02-14 22:17:26)

Offline

#14 2011-02-14 22:38:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Nested tags to get very compact <txp /> code

In my opinion it doesn’t make much sense to keep those index files. Static content can much more easily be maintained if you put it in sticky articles or in forms. Or even put the code directly in Txp’s page templates. And if you are going to change the URLs anyway, now seems a good moment to move your files’ content into Textpattern itself.
If you do that, you can also make your menus dynamic, so that they are automatically adapted if you add new content.

But that’s just my opinion :)

Offline

#15 2011-02-17 06:50:53

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Nested tags to get very compact <txp /> code

I had removed all the index pages and for this reason I’hadn’t used what you said me in the last solution required so that I had re-created category links in static index pages like this: www.mysite.com/section/?c=category1

But something did not work: all my dinamic links to antecedent index articles had disappeared because the antecedent online <txp: /> expression (I used txp:article_custom + txp:permlink) don’t still allow them to display.

I didn’t consider this aspect: almost all of my page reported links to index articles and removing these I didn’t know how to link the new (static) index pages, appearing consequently in a format like this: www.mysite.com/abcd/abcd/section/first-section-page .

So I needed to return using to the index pages, to prevent SEO problems. At a same time I have maintained the if-statements to get the index-article photo &title . acting this way I could also prevent not having photo and title, when someone open the page as

www.mysite.com/abcd/abcd/section/first-section-page ,

instead of the index-article

www.mysite.com/abcd/abcd/section/first-section-page/index.html ;

also the page www.mysite.com/abcd/abcd/section/first-section-page displays again the category links to articles although when each category open to article list the page is now:

www.mysite.com/section/index.html?c=category1

At present this looks to be the better solution according to what I need.

Last edited by Bongo-man (2011-02-17 10:31:02)

Offline

Board footer

Powered by FluxBB