Another way so there is always an image for a static page by default (for instance, for a new page with no new background image set yet) would be to change the TD with DialogBox again to (making sure there are no spaces again, except for between Page and PageID - creating 2 class elements within one call)...
Code:
class="DialogBox{if $main eq "pages"}Page PageID{$page_data.pageid}{/if}"
then add two more classes to skin1.css like so. A default one with the same image...
Code:
TD.DialogBoxPage {
BACKGROUND-COLOR: #FFF;
TEXT-ALIGN: left;
PADDING: 10px;
BACKGROUND-IMAGE: url(images/xlogo.gif);
}
and then a second class which only references the image per pageid (remembering to append the correct pageid in this example again set at 12)
Code:
TD.PageID12 {
BACKGROUND-IMAGE: url(images/dingbats_categorie.gif);
}
So this way, for example, if you were to go and visit a static page with a pageid of 4 (a pageid which hasn't got a custom bg image yet) then the xcart logo will appear as the background image. If you were to go to a page with pageid 12 then the dingbats would appear instead.
Hope this helps.