Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2020-07-27 20:58:51

afoster
Member
Registered: 2020-07-25
Posts: 12

Re: Comment Modules

I’m trying to follow the tutorial and I have reached the setting up the pages portion and this is where I am running into trouble. The way I read it is that I am supposed to change the archive and default pages with the code that is in the pages folder of the zip file I have downloaded.

The version of textpattern that I am using for this tutorial is 4.81 (much different than the one in the tutorial) and the pages included in the 4.81 version are archive, default, error_default. I replaced the code in the archive and default pages with the code in the zip file, and since there is no home page, I added the code from the zip file into a new home page. I then went back to the sections page and changed the default page to point to the home page, the blog page to point to the archive page and left the rest of them to point to the default page.

What is displayed after all that is the three links and nothing else except the footer. I have done this twice with the same result. Could one of you refer to the tutorial and show/tell me where I went wrong? Thanks.

Offline

#14 2020-07-27 22:44:20

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,881
Website

Re: Comment Modules

Apologies. Yes that tutorial is quite old but i think it should work for helping one understand 4.8.1

all the templates sources that i know of are for older versions of TxP. Perhaps others may know of other templates.

NOTE: now that i think about it how does one output our Textpattern site as code for its various Sections Forms Pages Styles ??


…. texted postive

Offline

#15 2020-07-28 03:22:56

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,881
Website

Re: Comment Modules

anyone know what the plans are for txpthemes


…. texted postive

Offline

#16 2020-07-28 04:25:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,774
Website GitHub Twitter

Re: Comment Modules

bici wrote #324922:

anyone know what the plans are for txpthemes

As far as i can tell, it’s working just fine


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#17 2020-07-28 05:12:15

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,881
Website

Re: Comment Modules

colak wrote #324923:

As far as i can tell, it’s working just fine

from this link there is no way to your link.


…. texted postive

Offline

#18 2020-07-28 05:13:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,774
Website GitHub Twitter

Re: Comment Modules

bici wrote #324924:

from this link there is no way to your link.

Hi Bici, Indeed it is cryptic. You click on “Themes” and there is a drop down menu with links.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#19 2020-07-28 05:17:15

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,881
Website

Re: Comment Modules

colak wrote #324925:

Hi Bici, Indeed it is cryptic. You click on “Themes” and there is a drop down menu with links.

thanks! it doesn’t seem to work in Safari. I had to use Firefox.

so yes very cryptic.


…. texted postive

Offline

#20 2020-07-28 07:14:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,774
Website GitHub Twitter

Re: Comment Modules

bici wrote #324926:

thanks! it doesn’t seem to work in Safari.

It worked on Safari versions 13.1.1 and 12.1.1 for me. Are you sure that you do not have a plugin messing it up?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#21 2020-07-28 09:08:30

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,189
Website

Re: Comment Modules

bici wrote #324921:

NOTE: now that i think about it how does one output our Textpattern site as code for its various Sections Forms Pages Styles ??

If you mean from your own templates, if you’re on a 4.7+, you can go to:

  • Admin › Presentation › Themes.
  • Put a tick-mark by your theme
  • From the With selected… dropdown, choose Export to disk.

You’ll then find a folder in the /themes directory of your site on your server with all the pages, forms and styles as files.

If you mean the default template that Textpattern comes with, you can do the same as above if you haven’t modified it, or you can always find the most recent release version on GitHub.


TXP Builders – finely-crafted code, design and txp

Offline

#22 2020-07-28 09:15:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,189
Website

Re: Comment Modules

afoster wrote #324852:

Perhaps you can also tell me how to add a menu item next to Home/Articles in the navigation banner?

Textpattern is flexible, so you can build your own menus according to different principles. In the default template that comes with Textpattern, the menu is built from a list of sections. You can see the relevant bit of code in the body_header form (type: misc) – here it is on GitHub.

That means, if you add a new section under Presentation › Sections, a new menu item will automatically be added. Sections are a grouping mechanism, and adding a section just adds the “header” so to speak. To show articles under this heading, create a new article in Content › Write and assign it to your new section in the dropdown on the right. When you visit the front end, you’ll see it appear in your new section.


TXP Builders – finely-crafted code, design and txp

Offline

#23 2020-07-28 09:17:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,566
Website GitHub

Re: Comment Modules

afoster wrote #324918:

I’m trying to follow the tutorial and I have reached the setting up the pages portion and this is where I am running into trouble.

Did you check out the Textpattern in two minutes document?

The contents of the zip file that bici pointed you to, is likely very out of date so I would just take the sentiment of that article and work from there.

A quick primer:

  • Sections
    Represent your site navigation structure – e.g. blog, articles, products, services, contact, and home page (called “default” in the back-end).
  • Pages
    Are blueprints that you can assign to one or more sections. They contain scaffolding such as HTML into which you wish to insert dynamic data from the database.
  • Styles
    Contain formatting rules that pretty up the pages markup. Again, assign these to one or more sections as you need.
  • Forms
    Are snippets of reusable content that you can you to save you effort. So if you want to apply the same ‘look’ to every article in a list you can set up some mini-scaffolding in a form and then in your Textpattern tags tell it to render each item in a list with that particular form. Thus if you decide later to change how you want to display your list (maybe you want to add the categories or publish date or author information or change the layout slightly) you alter it once in your form, and then your site instantly changes everywhere you’re employed that form.
  • Articles (and other content)
    These represent your site content. Each article lives in one section only. Your articles are displayed according to the page/forms/styles that you have defined for the section in which your article is written.
  • Categories
    Articles can be assigned up to two categories. These simply allow your site visitors to find collections of content that may be in more than one physical section. They act like a subset of tags. You might have sections called /recipes and /chefs. If you allow visitors to browse your categories, they could find articles ‘tagged’ with desserts that would filter out the dessert recipes and chefs who specialise in making them, presenting them in one list for easy perusal.
  • Tags
    Inside your pages/forms you put <txp:...> tags. These simple act as placeholders for dynamic content you want to inject at that point from the database. So if you want a navigation bar that shows your site sections you add <txp:section_list /> to your page template (or inside a form that you’ve included in your page) at the point you want the menu to appear. The tag’s attributes (such as wraptag and class and sections, etc) allow you to customise how the tag behaves when it fetches the content from the database.

That’s pretty much it. If you study one of the Pages and a few Forms from the default theme that’s included in Textpattern 4.8 you’ll see that there are quite a few comments sprinkled throughout. These are designed to help orient you, so take a look around to get a feel for what’s going on. Then maybe find a place in your site you want to change – perhaps the header – and alter the corresponding page. See the effect it has when you refresh the site.

Then try changing a tag or two. Mess about with a few attributes to see the effect they have. From there things should start to make a bit more sense.

Hope that helps.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#24 2020-07-28 15:31:56

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,881
Website

Re: Comment Modules

colak wrote #324927:

It worked on Safari versions 13.1.1 and 12.1.1 for me. Are you sure that you do not have a plugin messing it up?

it was not functioning on my laptop which is old. it woks on my desktop…. Safari version 12.1.2


…. texted postive

Offline

Board footer

Powered by FluxBB