Code templates in DDE: demonstration of CSS template.

In presentation AD103 ‘Embracing the EclipseTM Within’ Maureen Leland says (slide 14):

  • Code templates can be a tremendous time saver, and help implement common team conventions
  • Well received for LotusScript, but also available for:
    • Java
    • CSS
    • HTML
    • XML

If you take stylesheets for example, you can import them from the Database Navigator. But maybe you work on new projects where the stylesheets differ but you want to re-use a genuine setup of the file, setting up templates in Designer might help you.

I am not gonna write how you write a well structured css file and the benefits of it, but just explain how to setup a scratch for new css writing in Domino Designer.

First, open in Designer the Preferences and search after CSS. Select the ‘Templates’ links. Here you will see an overview of all your available CSS templates. Press ‘New…’.

Give your file a name, description and fill the pattern. Here for example I describe the basic layout for an HTML5 app. For the Context I select ‘New CSS’. Press OK to close the Preferences dialog.

Okey, so how you can get this in your next stylesheet?

If you haven’t already got it to your Designer setup, open the Package Explorer (Windows, Perspective, Open…). Go to the Resources folder, select Stylesheets and from there:

 

In the wizard enter CSS or navigate to the Web folder and select  CSS.

Give your new css file a name.

In the next dialog you are asked if you want to use a template. Select here the template you want and press Finish. The CSS Editor will open from where you can continue to write your CSS file.

 

 

About these ads

Born in Holland, current country of residence is Sweden. IBM Notes Consultant since 1997. Main focus is Xpages development. Other interests: computers, motorcycles, music (bass guitar) & cooking.

Tagged with: ,
Posted in CSS
3 comments on “Code templates in DDE: demonstration of CSS template.
  1. MarkyRoden says:

    nice example Patrick – thanks ! :)

  2. hopefully you can now reallocate some memory since you do not have to remember where you had stored locally that css template :o)

  3. Another way to do this is to use the Snippets view. Add it by going to Window\Show Eclipse Views and search for Snippets. There you can define a code block and put variables that you fill out when you add the snippet. It’s pretty cool actually, not to mention handy.

    Keith

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Introduction
I am Patrick Kwinten. I am a IBM Notes Domino Product Specialist since 1996. With this blog I am trying to give my contribution to the community.
.
CV
OpenNTF
Follow my projects on OpenNTF. Below are some examples:

Categories
RSS Feed
Follow

Get every new post delivered to your Inbox.

Join 204 other followers

%d bloggers like this: