The answer to your question is yes, kind of....
I'd use two plugins, the
bureaucracy and
structured data plugins.
Use Bureacracy to create a form. e.g. in
registered_domains:new_registered_domain
Use that form to create new pages with domain and registrar records. Have the form use a template that uses the Structured Data plugin. e.g.
templates:new_domaintpl
Use the Structured Data plugin to display data from domain and registrar records. e.g. an index page
registered_domains:start
A couple of points:-
* The data table in the Index page won't display new records until you've viewed the new record in a browser - when the page is created using the Bureaucracy form it will display a link to the new page. Follow that link to view the new record, after which the page data will be displayed in the Index.
* You probably want more information added with the Bureaucracy form e.g. Client details (a link to the page for that Client - which would also use Bureaucracy and the Structured Data Plugins).
* When you create the first record you need to change the "Site Number" field from
0000 to
0001. After that it will autoincrement. You'll find the Site Number field useful for other purposes (including the prevention of duplicate records). Note: I use similar functionality for my client records in a DokuWiki that maintains all my records for an IT business that includes selling domain names and creating/managing websites.
* (pet peeve).
www.example.com is not a domain name. It's a sub-domain.
example.com is the domain name.
* I'd suggest you change the Bureaucracy field for Registrar from a textbox to either a Select, or a data alias (both use lists of choices which will eliminate data entry errors).
Note: this is
very basic example code - at a minimum you'd want to improve the RegEx used for data entry checks.
Example code and structure:-
registered_domains:new_registered_domain
====== Create a New Registered Domain record ======
----
<form>
action template templates:new_domaintpl registered_domains:@@DomainName@@
Number "SiteNumber" >0 ++ 0000
Textbox "DomainName" /^(\s)*[A-Za-z]+((\s)?((\'|\-|\.)?([A-Za-z])+))*(\s)*$/
Textbox "Registrar" /^(\s)*[A-Za-z]+((\s)?((\'|\-|\.)?([A-Za-z])+))*(\s)*$/
Fieldset
Submit "Create a new website record"
Thanks "A new site record has been created"
</form>
----
[[registered_domains:start|Index of Registered Domains]]
[/color]
registered_domains:start
~~NOCACHE~~
====== Index of Registered Domains ======
----
---- datatable ----
cols : %title%, Registrar
headers: Domain Name
filter : %class%=domains
----
|[[doku.php?do=admin&page=data_clean|Flush database cache]]|[[:registered_domains:new_registered_domain|Create a New Registered Domain record]]|
[/color]
templates:new_domaintpl.txt
====== @@DomainName@@ ======
===== Registrar - @@Registrar@@ =====
---- dataentry domains ----
Site Number : @@SiteNumber@@
Domain Name : @@DomainName@@
Registrar : @@Registrar@@
----
\\
|[[registered_domains:start|Index of Registered Domains]]|[[registered_domains:new_registered_domain|Create a New Domain record]]|
[/color]
/$DokuWiki/data/pages $ tree
.
├── playground
├── registered_domains
│ ├── new_registered_domain.txt
│ └── start.txt
├── sidebar.txt
├── start.txt
├── templates
│ └── new_domaintpl.txt
└── wiki
├── dokuwiki.txt
├── syntax.txt
└── welcome.txt
4 directories, 9 files
[/color]