PDA

View Full Version : Changing Templates on the Fly


armsys
01-04-2008, 09:07 PM
Is it possible to change templates on the fly?
After importing links of some PDF files into my Library folder, which is assigned with a user-defined template "Book", the newly imported said PDF files are assigned automatically by UR with the "Document" template. How can I convert it to the "Book" template? The following screen shot indicates no option other than "Document" can be chosen.

Armstrong

ashwken
01-05-2008, 12:51 AM
I don't think you can, unless there's some way to manipulate the sql database outside of UR.

What I think you need to do is look at the Default Child Template Attribute for the Item that you are importing to.

For example, create a new Item off the Root based on the Folder Template, for this new folder assign the Book Template as the Default Child Template for this Item. Now, for anything imported to this Folder the new Item created will be based on the Book Template (value assigned to Default Child Template).

This is assuming that the Book Template was based on the Document Template when it was created. If the Book Template was based on a text type Template, then UR is going to use the default Document Template as the basis for the import.

ashwken
01-05-2008, 02:38 AM
Originally posted by ashwken
This is assuming that the Book Template was based on the Document Template when it was created. If the Book Template was based on a text type Template, then UR is going to use the default Document Template as the basis for the import.
See the attached screens.

The first screen shot shows the available Templates for an Item that is based on a text type Template, all the available Templates are based on a text type Template.

The second screen shot shows the available Templates for an Item that is based on the document type Template, all the available Templates are based on a document type Template.

The type of Template that you create should be based on what you want displayed in the Detail Pane for the Item.

armsys
01-05-2008, 04:42 AM
ashwken,

The screen shots of your own UR masterpieces are always inspiring and amazing to me. Even for a magazine catalog, various templates and forms are used for Toc, Mag Title, Section Head,...etc. That's awesome.

In fact, the said screen shots did hit on my original question.

Phase 1 Question (focused on the Import process):
When importing "154.1 - What goes into great..." pdf files, how are fields in the Form filled up, automatically (by UR) or manually (by you)?
In my case, after copying the URL of a pdf file and pasting into UR "eBook" folder, the form isn't shown up. I attempted to change the Template Item from "Document" to "Book" in vain because the dropdown list only shows Document as the only choice.

Phase 2 Questions (focused on the changing Templates):
1. Referring to your two screen shots, can I change from, say, 04-TOC-Section-Head to, say, 02-Mag-Isssue? If not, why not?
2. What criteria and/or mechanism could determine the exposure (shown or hidden) of template options (in the Template Item) apparently based on (parent) Text and Document (system) templates?
3. After receiving your first response, I tinkered with my Book template. After manually changing Default Child Template from Text to Document, it'll stubbornly switch back to Text. But why? Is it because there are some Info Items which was already assigned with Book template (which, in turn, was assigned Text template)?

Phase 3 Questions (unrelated to the core issue here)
1. Obviously, you keep a detailed catalog of your magazines. Do you also use UR as a note taking tool for your readings?
2. For each issue of PC Magazine, do you use the same set of templates and forms?
3. Are layouts shown in your screen shots specially created for the Publications.urd?
4. Are the folders <PC Manage>, <1994-09-27 - v.13.16>, <1994-10-11 - v.13.17>,...etc. of the Folder template? I see a different icon shown here, instead of a regular folder icon.

Thanks for your help. Have a nice weekend.

Armstrong

armsys
01-05-2008, 07:10 AM
Sorry for being insanely inquisitive.
Further studying your focused folder <01 - Up Front>, though it may appear to be a folder, I'm not sure about the mirage, given the Template Item, on the Item Attributes pane, is assigned with "04-TOC_Section_Head template, not Folder.

So in UR, the fine distinction between the templates, core or derived, becomes increasingly foggy as we add the complexity to the database like your Publications.urd.

In fact, now I'm even vertiginously perplexed by the difference between the text and document templates (http://www.kinook.com/UltraRecall/Manual/coretemplates.htm). Though a Text template is intended for storing text data, a URL can be assigned to it, doesn't it? As such, it's more or less functionally resembling to a document template, doesn't it?

Armstrong

ashwken
01-05-2008, 10:47 AM
Originally posted by ashwken
The type of Template that you create should be based on what you want displayed in the Detail Pane for the Item.
Armstrong,

This is what you need to understand.

If you want the Detail Pane for an Item to display a data file (image, pdf, html...) then that Item must be based on the Document Template (or a user created Template that is based on the Document Template).

If you want the Detail Pane for an Item to display Text (either Rich Text or Plain Text, something that is editable) then that Item must be based on the Text Template (or a user created Template that is based on the Text Template).

Yes, you can place the URL Attribute on a Form, and you can assign that Form to a Text-based Template (Book), and you can even paste a URL value into the URL field on the Form, but that is NOT going to effect what is displayed in the Detail Pane "viewer area" for the Item - this is controlled by the type of Template that was used to create the Item.

In your particular case, you want to display a pdf file in the "viewer area" of the Detail Pane, for this to happen you need to create a Template based on the Document Template. It sounds like you have already created a Form called Book, assign this Form to the new Document Template you just created - then see the discussion upthread about Child Default Template assignment.

It might also help to examine the Primary Attribute value for the default UR Templates, this might shed some light on this issue.

Yes, you can re-assign a Template to an already existing Item, this is examplified in the screen shots provided, but the point of the screen shots was to show that the Templates available for re-assignment are all of the same type as the Item that has focus.

I'll try and answer your other questions later.

armsys
01-05-2008, 09:33 PM
Now I understand how to decide which one, text or document, should be chosen for the template. Thanks a lot.
Nonetheless, the situation remiains unsatisfactory. Based on your guidance, I deem a list of files (ListPro files) should be assigned with the text template because I just want a list, no more and no less. It's text by nature, certainly not document. Once importing the said ListPro files by Ctrl+C, Ctrl+V (copy & paste), all Info Items are automatically assigned with the Document template. None can be changed back to the Text template. Now we go back to square one of the question--How to change the template from Document to Text?

Armstrong

ashwken
01-05-2008, 10:48 PM
Originally posted by armsys
...(ListPro files)...
Once importing the said ListPro files by Ctrl+C, Ctrl+V (copy & paste), all Info Items are automatically assigned with the Document template.
UR is seeing the contents of the clipboard as a data file, which is why it is using the Document Template to create the Item from the Paste function.

As an experiment I went to Windows Explorer and copied a known text file to the clipboard, when pasting to UR a Text Item is created. Also, opened a ListPro file (.clf) in Notepad, although it does contain some text, it's mostly symbols - unless your're referring to another type of ListPro file.

You might want to take a look at this thread on Importing ListPro Files:

http://www.kinook.com/Forum/showthread.php?s=&threadid=1075

Hope this Helps.

ashwken
01-05-2008, 11:08 PM
Originally posted by armsys
I deem a list of files (ListPro files) should be assigned with the text template because I just want a list, no more and no less. It's text by nature, certainly not document.
Wait a minute...

Are you going to Windows Explorer, selecting a series of files, copy to clipboard, then pasting to an Item in the UR Data Explorer?

This will create one Item for each file in the clipboard.

Alternately, create a new Text Item in UR, set your cursor (focus) to the Detail Pane for this Item, then paste, this will create a "list" of hyperlinks to the files.

If you don't want the hyperlinks in this "list", just the filenames as plain text - I don't know how to do that easily. I could do it from DOS with the DIR /bare command redirected to a text file, but from Windows I don't know.

armsys
01-05-2008, 11:13 PM
Thanks for your helpful guidance.
Originally posted by ashwken
You might want to take a look at this thread on Importing ListPro Files:

http://www.kinook.com/Forum/showthread.php?s=&threadid=1075
I read the helpful thread a long time showing me how to convert the content of a ListPro file into UR Info Items. I'm sorry it isn't relevant to the issue here.

The current issue pertains a list of fils from the Windows Explorer, including but not limited to ListPro files. The central question is how to create a list of Info Items automatically, each corresponding to a file in the Windows Explorer. My objective is add some detailed description (notes) to the Windows files so that UR can search for me in no time.

Thanks for your help.

Armstrong

armsys
01-05-2008, 11:21 PM
Originally posted by ashwken
If you don't want the hyperlinks in this "list", just the filenames as plain text - I don't know how to do that easily. I could do it from DOS with the DIR /bare command redirected to a text file, but from Windows I don't know.
Of course, I need the URL so that when UR finds me a list of interested ListPro files I can jump into it instantly.

In essence, it's a list of list files! The advantage of using UR is the keywording and rapid search.

Yes, I need the URL for rapid perusal, in addition to the Filename and detailed description. Do you think a Document template should be fine in this case?

Armstrong

ashwken
01-06-2008, 01:55 AM
Ok, I should have done this sooner, sometimes words just get in the way when talking about something.

I need to split the attachment into (3) parts - screens and a urd.

How close is this to what you need?

ashwken
01-06-2008, 01:57 AM
Here's part-2.

ashwken
01-06-2008, 01:58 AM
Here's part-3, contains the urd.

ashwken
01-06-2008, 03:33 AM
Importing via File | Import | A Folder

Here UR reverts to the UR Default Folder Template. You will need to change the Default Child Template to Filename_Descrp for the UR Default Folder Template.

This method of import will allow for Synchronization at the Folder level, the URL Attribute for the Habitat Folder was populated during import.

This was prompted after reading about Folder Synchronization in the help file.

The screens do not include the import dialogs, but the result of the import.

armsys
01-06-2008, 04:14 AM
Many thanks for a series of screen shots showing step by step the entire process of creating a sophisticated database. UR is an underappreciated and underexploited innovative database tool. It represents a new paradigm no other software developers have boldly thought of it before. As such, it's a long way for UR to reach the wider market.

Without your enlightenment, I may never be able to exploit the full potential of the UR. Thanks a lot.

I have been puzzeld by the innards of your _User-Defined KW. Would you be very kind to share the secret with us?

Thanks again.

Armstrong

armsys
01-06-2008, 09:17 AM
ashwken,

Forgive my voracity for learning more UR techniques. Would you be exceedingly generous enough to provide me an empty Publications.urd? And I wish to correspond with you direct if you don't mind.
Thanks.

Armstrong

ashwken
01-06-2008, 10:09 AM
Originally posted by armsys
Would you be exceedingly generous enough to provide me an empty Publications.urd?
Let me see what I can do.

I don't mind direct contact, but part of the purpose for all of this is to help those who are reading this board and not yet participating.

In the meantime, did the samples address what you are trying to accomplish?

Thanks.

armsys
01-06-2008, 10:23 AM
I have been studying every single screen shot you uploaded here. Of course, they are helpful to my database design.
For the moment, I'm still intrigued by your _User-Defined KW.

The direct contact involves discussion of setting up a gallary of UR sample urds to be hosted by Kinook.

Armstrong

ashwken
01-06-2008, 01:25 PM
Originally posted by armsys
...I'm still intrigued by your _User-Defined KW.

The direct contact involves discussion of setting up a gallary of UR sample urds to be hosted by Kinook.

Please see the (2) part attachment (screens - _User-Defined KW-1,2) in this thread (User Defined Keywords and Templates):

http://www.kinook.com/Forum/showthread.php?s=&threadid=3311

Regarding User Supplied Samples

The 250k attachment limit of the forum can be nusiance, but understandable.

I am also concerned that my screen shots are in English, where the urd is multi-lingual.

If it allows us to help each other I'm for it.

armsys
01-06-2008, 06:00 PM
Originally posted by ashwken
Please see the (2) part attachment (screens - _User-Defined KW-1,2) in this thread (User Defined Keywords and Templates):

http://www.kinook.com/Forum/showthread.php?s=&threadid=3311

Thanks. I'm even surprised as you created another template for the purpose of tracking the User-Defined Keywords, which is also a subject of my quests to mastering UR

Originally posted by ashwken
Regarding User Supplied Samples

The 250k attachment limit of the forum can be nusiance, but understandable.

I am also concerned that my screen shots are in English, where the urd is multi-lingual.


1. Kinook may accommodate the file size issue. There's a will, there's a way.
2. 99% UR users are comfortable with English. Not sure how English has anything to do with the screen shots.

Thanks for your help.
Armstrong