Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-11-17 10:19:46
- teacakeLover
- New Member
- Registered: 2011-11-17
- Posts: 5
Starting off
Hello there.
I am fairly proficient in PHP and site design in generalm BUT, I have just installed TextPattern on my site and am at a loss as how to start it off.
I understand articles and categories, etc. But, how do I add static pages, like “pages” on Wordpress…? Do I need a template, or have I got to start the whole site from scratch?
I’m just a bit lost… and its a little embarrassing! I can’t seem to find anything in the FAQ…
Perhaps I should learn and then write a migration from WP to TP!
Thanks, Chris
Offline
Re: Starting off
hi Chris
Beginning with a new CMS is always hard (i remember myself from few years) but Textpattern is really powerful and i am sure it will sweet you.
To begin let me point you to the Textpattern documentation where you can find a lot of information, the forum here is also a big place to find code and examples, there is also txptips.com where you can find some useful tutorials or code for various situations.
You must inderstund first how textpattern works: page is the html code that s shown and style is the css part. before doing changes to the page i advise you to make a copy of the default page (because there is some textpattern tag that are useful to copy/past from) then take your html (if you have done one) and copy past it in the defaut page (add <txp:css format=“link” /> to your page that code will link the defaut css to your page), do the same way with the css, dont forget to upload your design images and to correct images links(depend on relative or absolute style you use in your website) then see your website and it appear!!
This the easy step you must integrate some textpattern tag (like txp:article and others) to make all things ok but it s the beginning.
Hope that help!
You can also download a textpattern template from textgarden.org install it and look at his page to see how others work.
Cheers.
Offline
Re: Starting off
Also, maybe download my replacement theme (shameless self-promotion) which has lots of commenting on what various bits and pieces actually do (much easier to understand than the old theme). It will be the new default theme at the next point release anyway. Note that you’ll need a SVN version of Textpattern to run it at the moment due to it’s use of a new TXP tag (<txp:author_email />
) that is not part of v4.4.1 (follow the documentation on the github page and you should be set).
Last edited by philwareham (2011-11-17 12:23:08)
Offline
#4 2011-11-17 12:14:01
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Starting off
Phil, can this tag be removed without deactivating other important parts of the template? I think your tipps and code comments are really valuable reading for a beginner (not only), but using the SVN isn’t that recommendable for a beginner.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Starting off
Yes it can, edit the ‘comments’ form in my theme from this…
<!-- load the comment email into a variable. you will be using below this along with author email variable loaded in form: default.article.txp
then check the comment email variable against article author email variable, and if it matches add 'comments-author' class -->
<txp:variable name="this_comment" value='<txp:comment_email />' />
<txp:if_variable name="this_comment" value='<txp:author_email />'>
<article class="comments comments-author">
<txp:else />
<article class="comments">
</txp:if_variable>
<h4>
<txp:comment_name />
<!-- ...now check the comment email variable against article author email variable, and if it matches add '(author)' text -->
<txp:if_variable name="this_comment" value='<txp:author_email />'>
<span>(<txp:text item="author" />)</span>
</txp:if_variable>
<!-- add a permlink so people can link direct to this comment -->
<txp:comment_permlink><span class="comment-anchor">#</span></txp:comment_permlink>
</h4>
<!-- add time info for comment, see default.article.txp for info on HTML5 'time' tag - also add a 'since' to show comment freshness -->
<p class="footnote"><time datetime="<txp:comment_time format='iso8601' />"><txp:comment_time format="%d/%m/%y" /> <txp:comment_time format="%H:%M" /> (<txp:comment_time format="since" />)</time></p>
<txp:comment_message />
</article>
…to this…
<article class="comments">
<h4>
<txp:comment_name />
<!-- add a permlink so people can link direct to this comment -->
<txp:comment_permlink><span class="comment-anchor">#</span></txp:comment_permlink>
</h4>
<!-- add time info for comment, see default.article.txp for info on HTML5 'time' tag - also add a 'since' to show comment freshness -->
<p class="footnote"><time datetime="<txp:comment_time format='iso8601' />"><txp:comment_time format="%d/%m/%y" /> <txp:comment_time format="%H:%M" /> (<txp:comment_time format="since" />)</time></p>
<txp:comment_message />
</article>
Means that the comments system cannot tell if the comment is by the original article author (and add additional CSS styling) but other than that works fine. I need to supply the devs the latest version of the theme and then hopefully that can push a new release out soonish, but that is not my call.
Offline
#6 2011-11-17 14:01:00
- teacakeLover
- New Member
- Registered: 2011-11-17
- Posts: 5
Re: Starting off
What do I do with this template? Do I upload all the pages to the root of my site?
Offline
Re: Starting off
If you are referring to my templates, follow this document
Offline
#8 2011-11-17 14:22:57
- teacakeLover
- New Member
- Registered: 2011-11-17
- Posts: 5
Re: Starting off
I started following that, but I got to forms and got confused. I don’t have a forms folder anywhere in my structure…
Offline
Re: Starting off
Within the Textpattern admin-side, go to presentation -> forms, open all the twisties in the column on the right-hand side. Select each corresponding form and paste the newer code in over what’s there already. Add any additional forms my theme uses that are not part of the default install, delete forms from default install that we don’t need (such as lofi and noted).
Same for pages – go to presentation -> pages, and CSS – go to presentation -> style.
Textpattern differs from many CMSes in that the HTML code is stored in the database as opposed to within directories in your root folder. If you want that setup instead, you’ll need to install a plugin called cnk_versioning as noted in my documentation.
Last edited by philwareham (2011-11-17 14:32:00)
Offline
#10 2011-11-17 14:38:05
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Starting off
Just to say it unequivocally cause the files format might be misleading for a TXP newbie coming from WP: TXP stores everything in the database.
Edit: I hesitated too long, Phil :)
Last edited by uli (2011-11-17 14:38:53)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#11 2011-11-17 14:50:16
- teacakeLover
- New Member
- Registered: 2011-11-17
- Posts: 5
Re: Starting off
so… my home page isn’t really an article. is there a special article type for this?
Offline
#12 2011-11-17 15:12:26
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Starting off
Your question isn’t quite clear to me, so don’t take this as a provocation, I just don’t get it: Now you’re clicking your way through the admin side, don’t you? If not: there’s this whole tab named “Content”. Try and post an article on the Write tab.
Or is your comprehension problem somewhere else?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline