Replacing the design of a Lotus Notes template with that of a database (or making the database a template) - templates

Short version:
In Lotus Notes, is it possible to replace the design of a template with the design of a regular database? I tried to make the database a template, so it would show up in the Replace design dialog, but it does not.
Long version:
Let's say I have a template called NewsTemplate.ntf on my dev. server which replicates to staging and prod. servers on demand. I do all development work in a database DevNews.nsf on the dev. server, which enables me to easily test the application in the web browser during development. When I want to deploy changes, this starts with manually copy-pasting changes from DevNews.nsf to NewsTemplate.ntf. (Yuck...) I can use the comparison tool in Domino Designer to compare the two and copy changes file by file, but this feels overly cumbersome. What I want to do is simply to replace the design of NewsTemplate.ntf with that of DevNews.nsf.
In the Replace design dialog only templates are listed, so it seems I have to make DevNews.nsf a template to do this. I checked the Database file is a master template checkbox in Application properties and entered the template name "DevNewsTemplate". However, it still does not show up in the list of templates in the Replace design dialog. I notice the database still has the file extension nsf. Is this the problem? Is there some other approach I should rather be taking to copy design changes from News.nsf to NewsTemplate.ntf
Bonus question 1: Can a template contain documents and work just like a database, only it is also a template which is used to distribute design to other templates/databases?
Bonus question 2: This site mentions templates and master templates, but it does not really explain what the difference between them is. What is the difference between a template and a master template? How do I make a template? How do I make a master template?
Edit:
Let's say instead of the single News.nsf database on the dev. server, there are two development databases called News1.nsf and News2.nsf, because there are two developers who need their own database to work in. Each developer has his News*.nsf (which resides on the dev. server) synchronized with an on-disk-project on his own PC, which is under source control with Git. The two developers' git repos keep in synch by pushing to/pulling from a central Git repo, so News1.nsf and News2.nsf are indirectly synchronized via this Git repo.
Each developer needs to be able to copy changes from his News*.nsf to NewsTemplate.ntf. The solution suggested by Panu Haaramo (using Refresh design) requires me to set NewsTemplate.ntf to inherit design from "DevNewsTemplate", which is the master template name I set for News1.nsf. Obviously I cannot use the same master template name for News2.nsf, since it resides on the same dev. server as News1.nsf. How can I interchangeably copy design from either News1.nsf or News2.nsf to NewsTemplate.ntf?
This figure should help with clarification:

The "Replace design" dialog filters by extension. It only shows "Templates".
Templates are defined as databases with the extension "ntf". They do NOT have to have template name assigned. Master Templates DO have a template name (properties of the database) and mostly are ntf files but they can also be nsf- files (as you already realized).
That is the difference between templates and master templates.
In Addition "Templates" appear with a blue database- icon at the top of the list in the replace design- dialog, "Master Templates" have a green template- icon and appear below the list of "Templates".
Therefor the list is divided in two separately sorted parts.
Databases created from templates loose their connection to the template after design replace, a "design refresh" afterwards is not possible anymore, for databases created from Master Templates you can choose whether to "Link" it to the template or not...
If you manually enter the Template- Name of your database (nsf or ntf), then you can refresh design (via menu or using a load design -f yourfile.nsf on the server console).
SO the answer to your main question is (as you already found out): Yes, a template can inherit its design from a database.
Now to Bonus 1: ntf- files are exactly the same as nsf- files (structurewise).. You can use them to store documents, profiles, whatever you want.
You can not:
Open an ntf in a browser
See an ntf in the "Open Database"- Dialog in the Notes- Client
(Admin relevant only) Compact an ntf using placeholders without using -* as Parameter...
That is the only difference.
Having documents in a template can be a bonus:
Every database you create from a template, contains all documents that have been in the template at that time.
Like that you can "populate" some default configurations etc. for every new database you create. This copy only occurs ONCE when creating new databases, it does not occur with design replace / design refresh.
Response to your Edit:
Just use "replace design" and give both nsfs a different template name. If you don't select "Inherit Future design changes" in the dialog, then the "Inherit design from master template - Template name" property of the ntf will not be set, it will not be "linked" to any of the development databases..
In fact: this is wrong, as I myself wrote above... NSFs will never appear in the "Replace Design"- Window... So the right solution for you will be:
News1.nsf has the Template name "News 1 Template"
News2.nsf has the Template name "News 2 Template"
If Designer 1 now needs to update the template then he does the following steps:
Enter "News 1 Template" in the "Inherit Design From Master Template" field of newstemplate.ntf
Use "File -> Application -> Refresh Design
Remove TemplateName from newstemplate.ntf

With Refresh Design you can replace design from nsf to ntf.
Bonus 1: Not really because you cannot access ntf with a browser.
Bonus 2: The db property is called "Master template". In the Admin help you linked using a "template" means refreshing the design manually and "master template" means using the Designer server task to refresh the design.
To your edit: I think you need to have the master template field empty for both dev databases and set it when you want to refresh the design.

Related

I am having serious problems customizing my views template to displayblog entries in drupal 7

I am having serious problems customizing my views template to displayblog entries in drupal 7.
please anyone with knowledge of what can help me please reply. i have gone through a couple of drupal documentations but no luck. my field.tpl.php seem to be the only template that actually affect my displays even though i have views-view-field.tpl.php, views-view--blog.tpl.php in the template .
In the view settings, under format, show, make sure you have fields selected, not content.
Under advanced, theme, click information to see which template files are being used, and click rescan if necessary.
If you have created or edited a view, please check under FORMAT section this should be Show:Fields and under Advanced section look for Theme:Information and click onto this, there will be a popup with all possible templates for the display plugin and for the style plugins. All field tpl will be available here those are exists in views fields, you can find your own and use as per your requirement.
When you edit your view open "Advanced" section on the right (collapsed by default) and click on "Information" from "Theme: Information" (last option in that section). There you can see what templates are used (bolded ones) and what could be used instead. You can even click on template description at the beginning of the line, and code will be displayed. Grab that code (copy) and create new template file with one of offered names. Place that template file in your theme and clear the cache. Now you can modify template by your needs.
Also, you even don't have to use all that hierarchy (even that's desirable), but you can i.e. find the template file that are looping over the rows and inside that loop put your html, so lower rank templates won't be included (i.e. template that iterates over fields or even over rows) . Again not so clear solution, but it works for me. I prefer having less template files and I know that nobody will work on that theme except me.

Controlling custom code usage in camunda modeller

I intend to use Camunda for my product. While all camunda abilities match with my needs, i have a concern about camunda modeler controlled usage. Following are my needs in modeller
Is it possible to create custom domain specific tasks which i can simply drag-drop during modeling. It should be possible to define custom properties needed by this custom state
Can I somehow control/prevent use of custom java code/scripts by person modeling process. I want to restrict use of only my custom tasks, so that we don't end up with lot of scattered code across processes.
Can experts share views to achieve these targets?
Recently Camunda Modeler (I am using release 1.4.0, published on October 2016) has been extended to allow json template installation, which can meets all of your needs (if I understand them correctly), or at least the most of them.
You may find documentation for templates build here. The documentation is in progress, but what is already published I think it is quite clear. Briefly you have to
list all the elements you want to customise (user tasks, general tasks, service tasks, listeners, links and so on)
find out the json representation (explained in the short documentation) of each element
insert all the jsoned elements in a file (for example: myElements.json)
put the file in a specific modeler folder (see below)
close and restart the modeler
For example if you have installed the modeler in C:\Tools\camunda-modeler\, the folder to publish the file into will be C:\Tools\camunda-modeler\resources\element-templates (note that resources will be already present, but element-templates will not; it will have to be created).
If all will be right the modeler will start without any error and you will find a new dropdown list selector on the right panel (as stated in the documentation) for all the elements for which a template has been defined. Generally you have to classify each templates as either a user task, or a service task, or generic task and so on, so that when you want to use it you have to start from the generic element. For example, if you prepare in the json file 2 templates of kind of user task, say userTask1 and userTask2, if you want to insert in your new process userTask1 you have to
pick up an empty userTask
and choose from the element template selector on the right the voice userTask1, so that the empty user task becomes quickly the userTask1 (with all my custom properties with my default values)
that's it
To sum up, you may build templates with custom id and name (editable), with custom properties (editable or not, or even hidden), with eventual input/output parameters. So you may have default values properties and also tasks with simplified selections or without any selections at all.
You may find good starting examples to build your own templates at this GIT repository.
Hope that is enough to understand.

Django CMS blog - Replacing templates for different cases

I'm not sure, Django CMS Blog is complete app or foundation for self-extending ? I can see one huge logical mistake - inside one app config, I can't easy change template - for list, detail, archive and item - they are strict and hardcoded in plugin code.
Is there any way to customize it without hacking the app/writing tons of custom plugins ?
I need several versions for each template - especially for blog_item.html, blog_detail.html and blog_archive.html.
I want to use plugin feature from Django CMS and don't want to hardcode whole layout in template include logic because this is broking MVC logic (!).
OK, I know, I can include my custom subtemplate blog_item in list template with instance varibles, but I totaly can't imagine, how to do it in several places - front page, list page, post page etc BUT using regular Django CMS plugin features - I have static placeholders and tpl blocks - but there still is one template for item, inside app code.
I understand (less/more) Django template inheritance, but this case is more complicated than simple inheritance between templates.
At frontpage I want different list of latest posts - one template
at category list - different layout - so next template,
inside post - detail_view - need to be customized in other way.
Can somebody guide me, how to achieve this ? Custom plugin for each layout case or something ? A bunch of IF statement in template, dependend from contex is ridiculous..
I have replaced templates set, for app config - configured templates prefix, and whole folder with articles/*.html files. But changing item subtemplate cause change layout part in many places in the same time. This is main problem. Each using "latest posts" plugin, use same template - and I can't set template files for each plugin instance.
After some tests and talks, there is no nice way to replace templates, except extending plugin class and write own better version of plugin...

custom sitecore shell tools for en masse workflow approval

I'm wondering about documentation to create a simple custom ribbon control for sitecore shell.
The problem i'm trying to address is that Admins should be able to force all subitems recursively to be approved to a certain workflow state (rather than approve each one manually), but we currently don't know any way to achieve that.
To solve this, we want to force items throught the workflow state (triggering the corresponding commands) programmatically, but we need a sane way for admins to interact with this, the sensible option would be a custom thingie in sitecore shell, but we aren't sure how easy is to achieve that.
any recommended readings for this problem?
Though this article claims to be written for Sitecore 5.3, the same steps apply for 6.x as well. Note: it requires access to the SDN: How to create a ribbon button in Sitecore v5.3
The high-level points from the article are:
Create a new class that inherits from Sitecore.Shell.Framework.Commands.Command
Mark the class as [Serializable]. It might not be necessary for simple commands, but add it now so you don't get problems later! Otherwise the button might not work correctly (this is related to pipelines - and the fact that pipelines might be stopped and resumed)
Override Execute() and possibly also GetIcon(), GetHeader(), QueryState(), GetClick(), GetSubmenuItems()
Add a new <command name="…" type="..."> tag to /App_Config/Commands.config file
Log into Sitecore and switch to the core database
Navigate to /sitecore/content/Applications/Content Editor/Ribbons and create (or copy) a command in the desired chunk
Enter your command name (the one from step 4) in the "Click" field (and supply a Header, Icon, Tooltip, etc)

TFS2010 - How can you change the "State" for a Task?

We are using Tasks to track individual development items and the "out of the box" configuration gives us only 2 states - Active and Closed. We would like to change it to:
Assigned
In Development
In Test
Ready for Production
Closed (In Production)
Any ideas on how to accomplish this? We've been through everything in the Admin site. I fine changing it in the DB if necessary but am not sure what should be changed - or if it is even in the DB.
Those are defined by the project template you selected when you created your project (MSF Agile for instance).
To customize, you can export your existing template(s), modify as needed, then import them back in.
Here is the MSDN link for customizing work item types. And here is the link for changing the workflow of a work item type (seems like you'd need to do this too).