Jahia DX > How to get started

0 (0 Good)
0 (0 Bad)

How to get started

by  kilarsen »  2011/06/07 17:59

Hi,
Brand new to Jahia and looking at 6.5, but is a little confused.

I have created a new Template set, which then contains the Base, a Home and a Simple template. In the Base there is one Area called PageContent.
As I understand it then, is that the layout made in the Base can be inherited to the Home and Simple template.
If I then look in the template set Intranet-Templates, the Base contains several Areas, Logo, PageTitle, SimpleSearch and so on.

How can I create the same layout in my own template set, with several Area's ?

regards
Kim

  (kilarsen)

Number of messages  2
Registration date
0 (0 Good)
0 (0 Bad)

Re: How to get started

by  rvt »  2011/06/07 17:59

 

Kim,

 

after creating a template set I just edit the file : jnt_template/html/template.<your templateset name>.jsp 

and create areas like this : <template:area path="logo"/>

My header looks like this:

<div id="header" style="z-index:100"> 

<div id="headerwrap"> 

<div id="menu"><template:area path="menu"/></div> 

<div id="logo"><template:area path="logo"/></div> 

<div id="search"><template:area path="search"/></div> 

<div class="clear"></div> 

</div> 

</div> 

Do not crate to much areas, and in principle just create the areas you need everywhere on your page.

CSS can be added in the css directory which you can include like this : <template:addResources type="css" resources="base.css"/> 

For some reason to make this active I had to export this as a war and import it back in WEB-INF/var/shared_modules to make it 'active' I am not sure why, or that this is currently a issue with beta 6.5.

My main content area is just one large (full width) area and I later create sub-templates in Jahia to make columns.

 

Ries

  • Re: How to get started
    2011/07/04 09:00

    rvt <p> &nbsp;</p> <p> <title></title> </p> <p> Kim,</p> <p> &nbsp;</p> <p> after creating a template set I just edit the file : jnt_template/html/template.&lt;your templateset name&gt;.jsp&nbsp;</p> <p> and create areas like this : &lt;template:area path=&quot;logo&quot;/&gt;</p> <p> My header looks like this:</p> <pre> &lt;div id=&quot;header&quot; style=&quot;z-index:100&quot;&gt; &lt;div id=&quot;headerwrap&quot;&gt; &lt;div id=&quot;menu&quot;&gt;&lt;template:area path=&quot;menu&quot;/&gt;&lt;/div&gt; &lt;div id=&quot;logo&quot;&gt;&lt;template:area path=&quot;logo&quot;/&gt;&lt;/div&gt; &lt;div id=&quot;search&quot;&gt;&lt;template:area path=&quot;search&quot;/&gt;&lt;/div&gt; &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </pre> <p> Do not crate to much areas, and in principle just create the areas you need everywhere on your page.</p> <p> CSS can be added in the css directory which you can include like this : &lt;template:addResources type=&quot;css&quot; resources=&quot;base.css&quot;/&gt;&nbsp;</p> <p> For some reason to make this active I had to export this as a war and import it back in WEB-INF/var/shared_modules to make it &#39;active&#39; I am not sure why, or that this is currently a issue with beta 6.5.</p> <p> My main content area is just one large (full width) area and I later create sub-templates in Jahia to make columns.</p> <p> &nbsp;</p> <p> Ries</p>

  • Number of messages  185
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: How to get started

    by  tyurk »  2011/06/07 17:59

     

    Ries,

    The import seems to add the actual template set to the repository. For an initial template set, you can:

    1. Create the template.<myTemplateSetBase>.jsp file as you said inside a your module,

    2. Compile and deploy the module to the Jahia instance (in the shared_modules folder, as you mentioned),

    3. Then create the template set (preferably from scratch) in Jahia, and

    4. Right-click -> edit on the base template, then under view, change to <myTemplateSetBase>.

     

    And for the record, I agree with you re not too many areas in the basic template. In theory you can build it up with nothing more than:

    <div id="something">
    
    <template:area path="something"/>
    
    </div>

    And build everything up from there with layout elements. The "something" div may of course need to be wrapped with all kinds of other stuff to get the desired layout, but as a general rule the rest can be done with areas and appropriate use of columns...unless you want to get really fancy 

     

    Denis

      (tyurk)

    Number of messages  38
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: How to get started

    by  kilarsen »  2011/06/07 18:00

     

    Hi Ries and Denis,

     

    Thanks for the answers, which helped me understand what is needed. I would just have expected that it was possible to do it from Jahia instead of doing it "by hand"  laugh

    I will try it out and see if it works for me.

    Thanks again.

    Regards

    Kim

      (kilarsen)

    Number of messages  2
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: How to get started

    by  tyurk »  2011/06/07 18:00

    Kim,
    You can always duplicate an existing template set. Templates-web-blue starts with only a pagecontent area, whereas templates-web starts with a header, body and footer areas (if i recall correctly).

    Cheers,

    Denis

      (tyurk)

    Number of messages  38
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: How to get started

    by  philkemp »  2011/06/07 18:00

     

    Hello,

     

    I'm also new to Jahia and I have been looking at the beta 6.5 version to try and work out how this CMS works.

    The one big thing I have found so far is that there doesn't seem to be much in the way of "getting started" documentation. I am not talking about how to use the system, after a while it is possible to work out how everything works. I am more interested in how new content types are developed, how the template layout is changed, and how to add tweaks or custom features to the administration. So far, all I see are lengthy HTML pages with little in the way of code examples.

    Does anyone know if there is any documentation of this sort in the pipeline, or does anything like this already exist? (I have tried searching, but I did not find anything)

     

    Cheers,

    Phil.

      (philkemp)

    Number of messages  5
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page