Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-04-05 18:24:42

thiago
New Member
Registered: 2012-04-05
Posts: 8

Editing sections via the panel

Hi everyone,

Is there a way to edit pages (I guess in Textpattern we call it sections?) via the admin panel? Like in WordPress, we can edit/add pages content (About, Contact, etc) via the panel using the text editor. It’s perfect for clients who don’t know HTML and wants to be able to edit the site’s content on their own. From what I see, we can only edit/add blog articles in Textpattern panel (from a client’s perspective).

Sorry if it’s a dumb question, but I don’t have much experience with TXP. :)

Thanks,
Cheers.

Offline

#2 2012-04-05 20:14:56

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

Little bit difficult figuring out what you mean. I myself never used WP, you don’t yet speak Textpatternish ;)

I advise you to read a short article from the TXP docs, Textpattern Semantic Model, and if the question still remains, please come back and ask whatever you want to know. But after this reading you’ll have a much better insight into what the elements are that Textpattern offers and how they interlock and interact with each other.

Welcome to the forum, thiago!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2012-04-05 20:20:17

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: Editing sections via the panel

Yes there is,
To create a page or edit it settings go to Presentation > Sections, there you will find the sections list,
you will then be able to create more sections and edit each of their settings as choosing the CSS stylesheet and template code.

A TXP section is two things:
1. A link in the url
2. An area where you can assign dynamic content to it as in TXP it’s called ‘Articles’ (like ‘Posts’ in WP).

To edit a section template code go to Presentation > Pages,
As in TXP, pages’ template codes are called ‘Pages’, combined with code snippets that called ‘Forms’ Presentation > Forms

In most cases you don’t want your client to deal with code, so to add/remove pages your client will need to visit the ‘Sections’ tab.

—-

Edit: Uli was faster.

Last edited by THE BLUE DRAGON (2012-04-05 20:23:56)

Offline

#4 2012-04-05 20:32:46

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

OT:

THE BLUE DRAGON wrote:

As in TXP, pages’ template codes are called ‘Pages’, combined with code snippets that called ‘Forms’ Presentation > Forms

Each time I know someone comes from the world of WP terms I think not only “Form” is a horrible term, even “Page” is.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2012-04-05 20:44:20

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: Editing sections via the panel

uli wrote:

Each time I know someone comes from the world of WP terms I think not only “Form” is a horrible term, even “Page” is.

+1, not only from WP world, but in general.
But it also kind of makes TXP a unique cute monster that you just wish to huge it and squeeze LOL :)

Last edited by THE BLUE DRAGON (2012-04-05 20:44:38)

Offline

#6 2012-04-05 20:50:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

THE BLUE DRAGON wrote:

unique cute monster that you just wish to huge it and squeeze LOL :)

:)

You’re not alone, see “wabi sabi”.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2012-04-05 20:59:37

thiago
New Member
Registered: 2012-04-05
Posts: 8

Re: Editing sections via the panel

Thanks for replying guys! I’ve heard the TXP community is one of most friendly ones and it’s true. :)

However, I think I’m too dumb for TXP, lol. In some ways it seems simpler than WP, in other ways, it seems more complicated.

For example, in WP I go to the panel and create a page “About” or “Contact” or whatever. And I can throw the page content there. The client is able to edit this content using the text editor without having to worry with code.

I guess my question is, where do clients go if they want to edit the site’s content? Without having to deal with code. Let’s say the client wants to edit the “Contact” page’s content. The content, not the “page template”. Is there a way to do that?

I have the feeling this is the most dumb question ever, lol. Sorry guys :( Maybe it’s better for me to stick with WP, lol.

Offline

#8 2012-04-05 21:18:29

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

thiago wrote:

I guess my question is, where do clients go if they want to edit the site’s content? Without having to deal with code. Let’s say the client wants to edit the “Contact” page’s content. The content, not the “page template”. Is there a way to do that?

Sure! It’s all done via the Write tab (Content > Write).

Just to be sure: Did you already install TXP and so can follow any steps we’ll recommend?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2012-04-05 21:23:38

thiago
New Member
Registered: 2012-04-05
Posts: 8

Re: Editing sections via the panel

Yes I did! :)

Last edited by thiago (2012-04-05 21:23:53)

Offline

#10 2012-04-05 21:31:13

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

Well, then log in to the Admin, go to Content > Write and have a little play. This is where your clients will work ;) Watch what’s changed on the front side when you click “View” (displays the single article you just edited) or when you preview the homepage (via the View Site button).


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#11 2012-04-05 21:44:11

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

BTW, for quickly exploring what your clients will see when you assign them a certain user level, I recommend a plugin by one of our core devs, Bloke/Stef Dawson: smd_faux_role.

That way you don’t need to create any of TXP’s user levels, log out, change name and pass, log back in, click your way back to where you once were, just to see you’ve forgotten to leave a certain backend page open for comparisons.

With faux_role installed you’ll get a dropdown menu on any of the admin pages (very desirable but needs a quick editing the plugin code) to rapidly change role while staying on that page you want to explore in any user role.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#12 2012-04-05 21:53:23

thiago
New Member
Registered: 2012-04-05
Posts: 8

Re: Editing sections via the panel

Got it!

In the default theme, there’s a “About” section already created, but there’s no content. So I went to Content > Write and changed the “section’ dropdown menu on the right from “articles” to “about”. Is that correct?

Offline

#13 2012-04-05 21:55:30

thiago
New Member
Registered: 2012-04-05
Posts: 8

Re: Editing sections via the panel

Ah… Now there’s an About inside About :S

Edit-

Thanks for the plugin tip ;)

Last edited by thiago (2012-04-05 21:55:57)

Offline

#14 2012-04-05 22:10:04

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Editing sections via the panel

thiago wrote:

Is that correct?

Absolutely. When you now try the section links on any of your sites frontend pages, the article will appear under www.yoursite/about/yourarticle (in case you chose any of the speaking, hierarchic URL structures on Admin > Preferences). And it also changed its place (section) in the hierarchic content menu, left hand side on frontend pages.

Thanks for the plugin tip ;)

Welcome. Hope this tip doesn’t distract you too much from TXP essentials. In case you didn’t find how to install plugins: paste their text into the textarea on Admin > Plugins, click install (2x) and activate by clicking the link “No” which then changes to “Yes”. Read the help files for each plugin you install, they’re accessible from the plugins page.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#15 2012-04-05 22:24:13

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: Editing sections via the panel

thiago wrote:

Let’s say the client wants to edit the “Contact” page’s content. The content, not the “page template”. Is there a way to do that?

For that there are articles (like posts in WP) You will need to create 3 things:
  • A page (template-code) or use exist one.
  • A section (a link to that template-code [example.com/contact])
  • An article (the dynamic content/text that will appear)

Name all “Contact”.
Set the section page “Uses page:” setting to “Contact” which is the template code you created.
Assign the article to the “Contact” section.

In the page/template-code Presentation > Pages > Contact you will need to use the <txp:article /> tag, or <txp:article_custom /> tag,
In this case I personally will choose to use the article_custom tag,
which will point on the specific article you just created and will not let to present any other articles’ content beside of it.

Let’s say your article ID# is “5”,
then your page/template-code can look something like this:
(you can find the article id# in the Content > Articles tab)

<!DOCTYPE html>
<html>
<head>
</head>
<body>
	<h1>Contact</h1>
	<txp:article_custom id="5">
		<txp:body />
	</txp:article_custom>
</body>
</html>

This will present the body content of article #5,
which will use for you and your client to easily edit it’s content.

In case and you choose to use the regular article tag instead of article_custom then it will look like this:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
	<h1>Contact</h1>
	<txp:article limit="1">
		<txp:body />
	</txp:article_custom>
</body>
</html>

Which will end with the same result unless you or your client will publish another article and assign it to the “Contact” section.
You can add the “sort” attribute to show only the first published article that assign to the section.
<txp:article limit="1" sort="Posted asc">
and if your client will change the publish date of the second article to be before the first one, then this will not help, which is why I choose to use article_custom and point on a specific article id# as mentioned in the first example code.

Done, from there each time you or your client will need to edit the basic content/text of “Contact” page, all you will need to do is to visit the Articles tab Content > Articles and edit the article.

Important to mention that this is just a very simple example, if you wish you can go wild with txp-forms/custom-fields and more.

Last edited by THE BLUE DRAGON (2012-04-05 22:25:32)

Offline

Board footer

Powered by FluxBB