Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-16 21:59:53

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

[request] Custom textile/code snippet library within Write tab

I often have non-technical clients who wish to edit content via Textpattern. I’d like to be able to offer them a dropdown menu in the Write tab that has a list of custom code snippets (that I’ve set up) or even entire “templates” for inserting within the article body.

As an example, a site might have bio pages that should always have this structure within the article body:

_Job title_
h2. Professional Experience
<txp:image class="bio" />Text goes here
h2. Education
Text goes here

Those non-technical clients are going to have a hard time remembering that they’re supposed to follow this format. Sure, they could look at an existing bio page and copy/paste from it, but trust me, most people don’t have the same best-practices habits that we coders do. They’re more likely to find themselves staring at a blank article with no clue what to do, and just start typing whatever the heck they want. Hello, ugly and inconsistent sites.

Ideally this “Article template” dropdown menu would be at one of the top corners (within the Write tab). It would have options specified by the admin; in this example it would be “Bio”. Upon selecting “Bio” from this menu, the corresponding text would be inserted in the article body textarea and the user could proceed to edit it.

For the admin, there could be an Extensions tab that allows article templates to be defined.

This would also be useful for smaller code snippets like specifying special file download forms or special image formatting. I often find myself digging around other articles trying to find an example of the one I wanted to use.

If something like this already exists, please let me know because I tried all the search terms I could think of and didn’t find anything.

Last edited by alannie (2008-05-16 22:01:23)

Offline

#2 2008-05-16 22:15:17

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [request] Custom textile/code snippet library within Write tab

Create an article which would work as a template and then use upm_savenew.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2008-05-16 22:24:02

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: [request] Custom textile/code snippet library within Write tab

maniqui wrote:

Create an article which would work as a template and then use upm_savenew.

Nice plugin to know about, thanks. I definitely will plan on using it for myself.

It however doesn’t entirely solve the problem of a non-technical client staring at a blank Write tab having forgotten what to do. The client would have to remember that he/she has the option of going to one of the previous articles and saving a copy of it. Same problem as copy/pasting from old into new, not exactly intuitive.

Offline

#4 2008-05-16 23:33:19

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: [request] Custom textile/code snippet library within Write tab

If you set up your article template with all your relevant things included, then give them the instructions they need on a piece of paper:

Open the article called ‘templatex’
Change the title
Delete the url-only title
Go into More and change the date and time to an hour in the future
Double check and click SAVE NEW
(templatex is still intact in its original state)
Now you are ready to write your article using the guidelines given – copying, pasting and deleting as necessary.
When you are finished go into More, set the timestamp to now and SAVE.


BB6 Band My band
Gud One My blog

Offline

#5 2008-05-16 23:37:16

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [request] Custom textile/code snippet library within Write tab

zero wrote:

If you set up your article template with all your relevant things included, then give them the instructions they need on a piece of paper:

  1. Open the article called ‘templatex’
  2. Change the title
  3. Delete the url-only title doesn’t need to on latest upm_savenew version
  4. Go into More and change the date and time to an hour in the future idem
  5. click SAVE NEW (templatex is still intact in its original state)
  6. Now you are ready to write your article using the guidelines given – copying, pasting and deleting as necessary.
  7. When you are finished go into More, set the timestamp to now and SAVE.

Last edited by maniqui (2008-05-16 23:37:32)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB