[opencms-dev] Beginner Problems

Marc Schlegel Marc.Schlegel at gmx.de
Mon Oct 9 00:51:47 CEST 2006


Also thanks for your help

I am now able to get the needed Resources but I can't do anything with
it (or not that what I want). I thought it is possible to get an
Instance of CmsSite (I want to read the title )?

But my biggest problem is still that the pictures are not shown. Until
this isn't fixed I can't set the site online

Thx again.
-- Marc


--------  Jon wrote -----------
.  This isn't really an OpenCms question, of course...  There's a CSS
attribute which you can apply to the body element, as far as I
remember, but
not all browsers will honour it.  Try Googling for "css minimum body
height"
or something similar.  Failing that, you can include an invisible
1px-by-1px
GIF in your page layout (whether you use tables or CSS) and give that a
height equal to your minimum height.

2.  I don't use template one, so I don't know what you mean by
row-column-template-head etc.  But if you're having problems including a
template element, you could always just copy and paste some code.  Maybe
someone else can suggest something better.

3.  CmsSiteManager is a class best left to OpenCms core code.  Instead,
org.opencms.file.CmsObject contains all the methods you need - e.g.
getFilesInFolder(String relativeFolderName).  Note (i) you can get an
instance of CmsObject from CmsJspActionElement, (ii) folder and file paths
are generally relative to the site root (i.e. you won't need to include
"/sites/default" or whatever), (iii) methods like getFilesInFolder()
either
return Lists with String members (being file/folder paths) or Lists of
CmsResource (being the OpenCms abstraction for file/folder resources) -
can't recall which.  CmsResource has useful methods on it too.

Jon

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marc Schlegel
Sent: 06 October 2006 12:45
To: opencms-dev at opencms.org
Subject: [opencms-dev] Beginner Problems

First I want to say HI to the community, this is my first post  :-)

I've several problems with opencms and it seems to be hard to find a
solution.

My first problem, well it's not a real problem but it's annoying me,
is that
I want to set the minimum height of my website. I have some sites which
contains not very much content (right now) and it doesn't look good
when the
page is only 100px high. I tried to find a property in the root-folder for
my html-pages.

The second is a little bit tricky. I have several picture-galleries (I am
studying abroad in Iceland and I have a lot of nice pricture  :-)  ) and I
want to use the structered-content "slideshow". The problem is that when i
look at the site the pictures are not shown, even when I go to the
details-view. The pictures are only displayed in the when I select the
"original" version. Is there a problem when OpenCMS tries to downsize the
pictures?

Last but not least I have a problem with a jsp-page. I have a submenu
(folder) where I want to introduce some friends from Iceland. My idea was
only to add a page for each friend and the index.jsp is (a overview of
all)
should be created automatically.

    <%
        // create a JSP action element
        org.opencms.jsp.CmsJspActionElement cms = new
    org.opencms.jsp.CmsJspActionElement(pageContext, request, response);
        org.opencms.site.CmsSiteManager siteManager = new
    org.opencms.site.CmsSiteManager();


        // load the template head
      
 
cms.include("/system/modules/org.opencms.frontend.templateone/templates/main
",
    "head");
    ---> Here I try to get the row-column-template-element
    <------------------
      
 
cms.include("/system/modules/org.opencms.frontend.templateone/templates/main
",
    "main");
    %>
    <h1>Hallo</h1>  
    <%
        // load the template foot
      
 
cms.include("/system/modules/org.opencms.frontend.templateone/templates/main
",
    "foot");
    %>

You can see that I am trying to get the row-column-element --> but I don't
know how.
And I don't know how I can get all pages within my subfolder
("/iceland/pages/friend")....I tried it with the SiteManager and I checked
the API but I couldn't find it (maybe I am blind).

Any help is appreciated

Best regards
--Marc




More information about the opencms-dev mailing list