Jump to content

multiple text fields in a template


Matze
 Share

Recommended Posts

Hi there,

i need around 20 simple text fields in a template, same properties for all, except the "label" (or title to use it in code). Something like this:

painter: _____________
period: _____________
canvas material: _____________
painting technique: _____________
etc

is there a way to avoid building 20 single fields? I use pro fields too, but cant see any solution e.g. with Multiplier or table.

Thank you

Matthias


 

Link to comment
Share on other sites

@Matze, if you own or consider ProFields, you may check out FunctionalFields as well. While conceptionally intended for text translations, I do not see a reason why this should not work here.

If you write something like this in your template file:

$thePainter = __text(' ', 'painter', 'label=painter, required=true');
$thePeriod = __text(' ', 'period', 'label=period, required=true');
$theCanvas = __text(' ', 'canvas', 'label=canvas material, required=true');
$theTechnique = __text(' ', 'technique', 'label=painting technique, required=true');

You'll see that in your page editor:

FunctionalField.jpg.6dadb4dcbe8376b9ea5ffa7bb01201f4.jpg

If you add more text replacement in your template file, these are added to all artist's pages immediately.
Sidenote: I'll have to set a space for the original text, otherwise the fields do not show up, so they are actually not empty in this example.

While this may be what you are looking for on first sight, I'd encourage you to think about using page references instead. Information like canvas material or painting technique are not endless and will repeat over various artists. Using plain text input, you'll have to repeat all this each time. And, if you are going multi-lingual, you'll have to enter every translation for every artist.

With page references you'll have many benefits, like faster searches (who is painting with this particular technique in that period), generally less data in your database (less data to transfer to build an index, for example), one point to enter that information and may even add more info about it. You may even create new "attribute-pages" on the fly when entering the artist's page.

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...