Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-08 18:35:45

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

Losing track of forms

The following is not meant to be a recipe, I’d rather want to initiate an exchange of experience.

As I’m inclined to wrap forms into forms, and tend towards creating flexible layouts that offer many different techniques which often cannot be combined in one form, consequently I quickly have a collection of more forms than my form panel is able to display without scrolling. In order not to be confused i’ve considered a method of naming forms according to where they are employed:
  1. Forms for pages: p_formname
    (all lowercase and with an “uglyfying” underslash, which makes the function prefix stand out a little.
    same applies to:)
  2. Forms for forms: f_formname
  3. Forms to be selected by authors: Formname
    (no prefix, first letter uppercase. They’re the only ones whose names look temptingly neat)

Named this way they give an indication for their employment, sort properly on the form panel, and are to avoid easily when selecting a form in the write panel. Seems they’re sorted there according to their time/date of last saving, so you could use this for tidying up the overwrite form menu a little for authors.

Maybe your ideas are far more differentiated or have taken another direction. I’m curious to see what you’ve figured out.


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

Offline

#2 2006-09-08 21:07:05

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Losing track of forms

My method is fairly similar, but I usually group by section.

  • Reusable chunks that appear either sitewide or multiple times: <samp>_header</samp>, <samp>_thumb</samp>
  • Section-specific:

<pre>
articles-list
articles-list-item
articles-img
articles-etc
</pre>

  • Also, what I’ve been doing lately is re-using the non-deletable forms. My default form looks like this on most site:

<code>
<txp:if_section name=“somewhere”>

</txp:if_section>
<txp:if_section name=“elsewhere”>

</txp:if_section>
</code>

(I don’t use else, since the form controls more than one section. Also, I use the search_results form for article lists/excerpts. Just toss an if_search conditional in, and you’re good.

Offline

#3 2006-09-08 21:18:03

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,392
Website GitHub Mastodon

Re: Losing track of forms

uli wrote:

Seems they’re sorted there according to their time/date of last saving, so you could use this for tidying up the overwrite form menu a little for authors.

Caveat: Forms will be sorted alphabetically in the next release, so you’d better not resort on any other sort order.

Offline

#4 2006-09-09 14:11:11

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

Re: Losing track of forms

ah, forgotten! (i’m mentally unsorted, so sorting things in my forms panel is a real need ;)

elements, which build the smallest possible group, which should not be peeled any further, like for instance <code><txp:body /></code> <code><txp:article_image /></code> <code><txp:author /></code> are suffixed “_core”
  • f_article_core

this way they continue to sort neatly, and it’s clear, which forms contain decorating elements and which ones i can leave out when i change the elements look. (better: _should_&nbsp;be clear. i often keep on digging through my forms ;)


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

Offline

Board footer

Powered by FluxBB