Vladimir,
It is worth looking at other implementations before you start, here are
some hard won lessons that may or may not yet make sense to you. However
you seem on track.
- A single tiddler for every person (YES)
- tagged `person` or 'contact' (because what if you document a
business?)
- Data stored in fields eg Phone/Address etc...
- text field shows the data stored in fields in nice way (*Do not do
this see below*) keep text for free form notes about your
person/contact
- How would I go about creating a "template" for such a tiddler - the
easy way is to create one with fields etc.. no values and clone it,
otherwise you can build a button that creates a new one with the required
fields
- How to implement required/optional fields?
- A single data tiddler for every person - *I would not unless
your contacts where in the thousands, and then probably not. Its much
easier to tag anything with a person, to relate it to that person(s)*
*Displaying the values in the fields of a contact*
Create a tiddler "DisplayContact" that references each of the fields as if
it was a contact tiddler and tag it with $:/tags/ViewTemplate
use the {{$:/tags/ViewTemplate||$:/core/ui/TagTemplate}} drag and drop to
order where they display
Only display the content if it is in fact a contact
eg
<$list filter="[is[current]tag[contact]]" valiable="null">
{{!!firstname}} {{!!lastname}}<br>
{{!!address1}}
{{!!address2}}
</$list>
Editing fields can be done in edit mode without any complexity but smarter
options are available.
I have just designed a method I may publish soon. But lets help when you
get there.
Regards
Tony
On Monday, July 2, 2018 at 12:19:10 AM UTC+10, Vladimír Macko wrote:
>
> Hello,
>
> I am fairly new to TW5 so I would be grateful for feedback and suggestions.
>
> *What I want to do*
>
> - a way to keep a database of people.
> - relatively flexible way to create a new person.
> - Required "field".
> - Optional "fields"
> - ability to reference information about such people anywhere on
> TW. {{FirstnameLastname!!title}}, {{FirstnameLastname##title}} ?
> - future proof.
> - If I decide to [[link]] towards a person, readable (nice looking)
> html but ability to edit the "fields" easily from there.
>
> *What I am considering*
>
> - A single tiddler for every person.
> - tagged `person`
> - Data stored in field.
> - text field shows the data stored in fields in nice way.
> - How would I go about creating a "template" for such a tiddler.
> - How to implement required/optional fields?
> - A single data tiddler for every person.
> - Any advantages?
>
> Thanks a lot!
>
> If you feel like pointing out something I missed/haven't considered that
> would be great.
>
> Kind regards,
> Vladimir
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a96e6648-2454-46a4-9f5e-1d31994db84b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.