www.netsi.dk

"The internet is just a layer on the real world" (don't forget that!)

Blog indlæg om opdateret nyhedsmodul i Dynamicweb 8

version 8 er blevet releaset i december 2011 og det indeholder en række forbedringer,
for eksempel er nyhedsmodulet blevet opgraderet. Peter Terkildsen har skrevet et blog indlæg på blog.bleau.dk om det opgraderede i Dynamicweb 8.

Læs blandt andet om:

  • Søgning i nyheder på tværs af alle nyhedskategorier
  • Søgemaskinevenlige URL’er når man ser en enkelt nyhed
  • Nyheder kan indgå i flere kategorier

Læs hele blog indlæget her: http://blog.bleau.dk/2011/nye-muligheder-i-nyhedsmodulet-i-dynamicweb-8/

Share

10 seconds guide to Dynamicweb Newsletter v/3 templates (sending out news)

This is a short note on constructing news for v/3 when sending out pieces of news.

 

It can be tricky to create newsletters in HTML, doing it from Dynamicweb CMS using the Newsletter v/3 does, I am sorry to say, not make things easier. Using the below you get the skeleton of the central news item loop:

 

<p>Dear <!--@DWUserName--></p>
<table>
<!--@LoopStart(ItemsLoop)-->
<tr>
<td>
<a href="<!--@LoopStart(IsSetupDetailLink)--><!--@ModuleDetailLink--><!--@LoopEnd(IsSetupDetailLink)-->"><!--@NewsHeading--></a>
<br />
<!--@If Defined(NewsManchet)-->
<!--@NewsManchet-->
<!--@EndIf(NewsManchet)-->
<!--@If Not Defined(NewsManchet)-->
<!--@NewsText#100-->&#8230;
<!--@EndIf(NewsManchet)-->
<br />
<a href="<!--@LoopStart(IsSetupDetailLink)--><!--@ModuleDetailLink--><!--@LoopEnd(IsSetupDetailLink)-->">Read more</a>
</td>
</tr>
<!--@LoopEnd(ItemsLoop)-->
</table>
Share

Printing HTML pages, make screen and print appear the same.

When using external stylesheets on a webpage you can specify which “media” it should apply to. For instance see these lines:

<link rel="" href="Blueprint/screen." type="text/css" media="screen, projection" />
<link rel="stylesheet" href="Blueprint/.css" type="text/css" media="print" />

As you might allready have guessed the screen.css will be choosen for screen (read: browser) and projection mode. When printing the print.css will be choosen if you print the webpage. So far so good.

Some times you will have a specific page for print, which say will render only a stripped down version of your content and prompt the user with a print dialogue (using a window.print() line of code). But when you see the page in the browser you are in “screen” media, and the style shown will be as defined in the screen.css. You may confuse the user as he gets a screen version ready for print – and printing it wil result in a version based on the print.css. I have made a jQuery based fix for this situation.

The page before and after the fix

The jQuery fix

The fix will disable any external stylesheets related to screen and make the print.css work on media types “all”. It is coded so that it will check for a “#print” added to the URL. So you should simply make the URL of the printversion have a “#print” in it. Here is the fix:

   1:  <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.6.2.min.js"></script>
   2:  <script type="text/javascript">
   3:  /* STH: 2011-07-07 Make any stylesheets target for "print" media active on "all" media types (including screen)
   4:      Also disable any layouts for screen
   5:  */
   6:  jQuery(function() {
   7:    var bPrint = (window.location.toString().indexOf('#print')!=-1);  
   8:    if (bPrint) {
   9:      // The user wants to print this page
  10:      jQuery('link[media*="print"]').attr('media', 'all'); // Enable the print styling for all media types, including screen.
  11:      jQuery('link[media*="screen"]').remove(); // remove any styling related to screen
  12:    }
  13:  })
  14:  </script>

 

The fix above has a link to jQuery, you do not have to include it if you allready have jQuery on your webpage.

Share

SQL: Get a list of all tables in a database

Sometimes if you use a system where you do not have a Manager at hand, perhaps only a web based query window you may find it hard to keep track of all defined tables in the system. I for one cannot remember all the tables used in for instance Dynamicweb CMS. Please note that the example query below is for Microsoft SQL server, I am not sure if it works in other SQL server environments.

Being logged in to the system as administrator you can get a SQL Query textarea like this one below. You can then enter:

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
order by TABLE_NAME

 

The Query Editor of Dynamicweb CMS - very handy

Links

Share

Encode URL in XSLT

If you need to URL encode something in XSLT, you can use serverside – not perfect, but it gets the job done. Here is the and below you can find link to a simpel XSLT which has the script implemented.

   1:    <script language="javascript" xmlns="urn:schemas-microsoft-com:xslt" implements-prefix="js">
   2:      <![CDATA[ 
   3:      // This will return a URI encoded string
   4:      function encodeURL(sUrl) {
   5:        sUrl.MoveNext();
   6:        sUrl = sUrl.Current.Value;
   7:        return (sUrl);
   8:      }
   9:      ]]>
  10:    </script>

Find example XSLT here: http://dl.dropbox.com/u/3260327/xslt/js_encodeURL.xslt

Share

SyntaxHighlighter: Getting syntax highlighting feature here, there and everywhere – including on your blog…

Tonight as I am preparing the setup of a new related blog (www.dwfeatures.com) I came across “SyntaxHightlighter” an open source client side code highlighter – I think that it is cool! So here is a short description of it so that you may start using it yourself.

Install plug-in on your wordpress blog

There are several plug-ins for wordpress which can use, I found Evolved interesting and installed it. Simply go in the control panel of your wordpress and click add new plug-in. Search for “ Evolved” and you will find it. Click install and activate!

SyntaxHighlighter Evolved plug-in for wordpress

Continue reading

Share

Dynamicweb CMS: Poll about errors in Dynamicweb…

I am prepearing myself for the upcoming blog with focus on features related to the system and its part. For a starter I will try out some things for now, here on this blog. Here is one such test – a Poll. Feel free to try it out, and if you have any ideas what should be on the www.dwfeatures.com blog, please feel free to write it here, or give me a peep on twitter: http://twitter.com/netsi1964

Share

The getimage.aspx of Dynamicweb CMS finally can crop as I always wanted it to!

Being a heavy user of Dynamicweb CMS I am very happy to discover that the latest version of the software has made the utility for cropping/scaling images work as I (IMHO) always have wished it to do! It is now possibel to specify both with and height and having the image fit inside the area keeping the aspect ratio of the image! Hurra!

You do know , right?

When you have a design to implement using Dynamicweb CMS and you have a list of items with images – say thumb images, Dynamicweb offers a nice utility which can ensure that the thumbs will have a given dimension. The images are cached on the server, so it is not using unnessesary resources of the server if you use the utility.

The getimage.aspx utility of Dynamicweb CMS

The utility can be found on any Dynamicweb soloution here:

http://[hostname]/Admin/Public/getImage.aspx

Enter the URL above and you will get a nice wizard which will dynamically produce what you need inside your . You can see the wizard above.

What makes things work for my needs!

To ensure that an image fits inside a container with known dimentions you need to:

  • Enter the dimensions (width/height)
  • Select the cropping offset: “Keep aspect ratio”

Try the utility by entering a path to an image – you have to start from “/files…”. When that is done, simply press OK and you will get a preview under the “Results” tab, as you can see below.

The Results tab of the getimage.aspx Dynamicweb utility

Using the Image URL in your templates

When you are happy with the results you should copy the “Image URL” path (highlighed with blue in the above image). The URL for my example is:

/admin/public/getimage.aspx?Image=/files/billeder/300×80.jpg&Format=jpg&Width=200&Height=100&Crop=5

If I were to use this path inside a template, I simply would replace the “/files/billeder/300×80.jpg” with a template tag like “<!--@Ecom:Product.ImageLarge.Clean—->”.

I hope this has helped you! I really find this improvement nice!

links

 

Share

“Hvem skal nu betale?”

Jeg arbejder professionelt med implementering af baserede hjemmesider. Det system jeg arbejder klart mest i er Dynamicweb CMS – et system som efter sigende har omkring 4000 fungerende (et korrekt ord?) hjemmesider i hele verden – primært i norden. Som andre systemer så kommer der jævnligt opdateringer – det er jo dejligt med nye up-to-date funktionalitet. Så langt så godt – men jeg vil gerne prøve at sammenligne kort med en anden branche.

Min Toyota kontra CMS

Jeg er den lykkelige ejer af en Toyota. Tidligere ejede jeg en Yaris og da den var ca. 2 år gammel modtog jeg et brev om at man havde konstateret at der kunne opstå et problem med bremserne under visse ekstreme omstændigheder. Jeg skulle bare køre ind til et selvvalgt Toyota værksted og de ville rette fejlen uden beregning. Hverken mig eller værkstedet ville blive lastet for noget i den forbindelse. Det er service!

Og nu til Dynamicweb CMS… Jeg oplever jævnligt at der opdages fejl som opstår på grund af fejl i Dynamicweb CMS. Jeg arbejder jo som sagt professionelt hos en Dynamicweb CMS Partner (Bleau A/S) og det er nok noget der i ovenstående situation med Toyota må være at betragte som at arbejde på et “autoriseret Dynamicweb værksted”. Selv om Dynamicweb CMS også selv finder fejl og retter dem uden beregning gennem hot-fixes, så er situationen fra før med fejlen på bilen i en Dynamicweb CMS verden normalt noget anderledes:

  1. Brugeren (chaufføren) oplever at noget ikke fungerer i hans “bil” (hans hjemme side)
  2. Han kontakter værkstedet
  3. Værkstedet må bruge megen tid på at fejlfinde og bevise overfor Dynamicweb CMS support at fejlen er noget der ligger i selve Dynamicweb
  4. Dynamicweb CMS anerkender måske at der er en fejl, men det medfører ikke at fejlen rettes. Fejl prioriteres naturligvis af Dynamicweb CMS.
  5. Brugeren må så acceptere at der ikke kommer en løsning “sådan lige”

Som professionel konsulent er det svært

  • At forklare overfor kunden at det er kundens problem.
  • At kunden vil blive faktureret den tid som vi har brugt på at finde fejl i det system vi har anbefalet dem.
  • At problemet ikke umiddelbart er blevet løst.
  • At en løsning vil koste yderligere tid (=penge).
  • At løsningen ikke nødvendigvis giver en forbedring.

Intet er fejlfrit! – men hvem skal nu betale?

Der er mange elementer i ovenstående sammenligning der kan anfægtes og en sammenligning mellem en bil og et CMS system er måske unfair. Det som jeg her forsøger at starte en diskussion om og brokker mig over er at det ikke er rimeligt at kunderne alene skal betale for noget som kan påvises er fejl i det produkt de har købt.

  • Jeg ville personligt aldrig betale for reperationen hvis min fladskærm holdte op med at virke indenfor garentiperioden! Det måtte producenten betale for (gennem forhandleren).
  • Jeg mener at det er i alles interesse at fejl rettes, så produktet bliver bedre.

Jeg har ikke en færdig model for hvordan man kunne løse problemet med at få dækket omkostninger ved fejl. Der er tre parter som burde dele omkostningen – brugerne, forhandlerne (partnerne) og Dynamicweb CMS. Idag er det kun de to første der betaler! Jeg tror på sigt at hverken brugere eller forhandlere kan leve med den model!

P.s: Ovenstående står for min egen personlige regning.

Share