Using external CSS site templates with 7.0.0.2
来源:互联网 发布:战地之王源码 编辑:程序博客网 时间:2024/06/06 01:54
Website designs are often provided as HTML and CSS files, with no dynamic content such as navigation or layout contents. Here are the steps to convert a static design into a dynamic theme.
1. Obtain an HTML document and its associated CSS and images. This documentation will be working with a design from the Free CSS Templates website:
freecsstemplates.org Chocolate Brown template
2. Create a new theme (see also: Copying the theme):
a) Mount the /themelist webDAV entry point:
/wps/mycontenthandler/dav/themelist/
b) Copy the "ibm.portal.7002Theme" folder to a temporary location on your hard drive
c) Rename the folder, for this example it will be called “chocolate”
d) Rename the HTML design document (i.e. index.html) to theme.html and replace the theme template file inside the "chocolate" folder
e) Copy any CSS and image resources needed by theme.html into the "chocolate" folder
f) Open "./chocolate/metadata/localized_<locale>.properties" and change the theme display name:
title=Chocolate
Connecting to the Portal WebDAV
Copying the theme
Make a unique copy of the static resources for your skin
g) Copy the chocolate folder into the /themelist folder. This will automatically create and register the new theme.
3. Create a test page with the new theme assigned and add a few portlets to it
4. View the page
note: There are no dynamic parts of the theme at this point
5. Mount the /fs-type1 webDAV entry point and navigate to "./themes/chocolate":
/wps/mycontenthandler/!ut/p/dav/fs-type1/
6. Open theme.html and add the following dynamic spot blocks [figure 1 below]:
a) Inside the <head> element, place this dynamic-content spot as the first line with that element:
<link rel="dynamic-content" href="co:head">
<link rel="dynamic-content" href="dyn-cs:id:7002theme_head">
b) Locate the HTML that displays the header logo and add this dynamic-content spot block after the logo div:
<div class="wpthemeClear"></div>
<header role="banner">
<div class="wpthemeHeader">
<div class="wpthemeInner">
<!-- responsible for the top most navigation links (horizontal list) -->
<a rel="dynamic-content" href="dyn-cs:id:7002theme_topNav"></a>
<!-- displays the page mode toggle to place the page into edit mode or view mode -->
<a rel="dynamic-content" href="dyn-cs:id:7002theme_pageModeToggle"></a>
</div>
</div><!-- end header -->
<div class="wpthemeBanner">
<div class="wpthemeBannerInner">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_primaryNav"></a>
<a rel="dynamic-content" href="dyn-cs:id:7002theme_commonActions"></a>
<div class="wpthemeClear"></div>
</div>
</div>
</div><!--end main banner-->
<div class="wpthemeSecondaryBanner">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_secondaryNav"></a>
<div class="wpthemeClear"></div>
</div>
</div><!--end secondary banner-->
</header>
c) Locate the HTML for the page contents and replace it with this dynamic-content spot block:
<div class="wpthemeMainContent">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_crumbTrail"></a>
<div class="wpthemeClear"></div>
<div id="wpthemeStatusBarContainer"></div>
</div>
<!-- required - do not remove -->
<a rel="dynamic-content" href="state.portlet:portlet?include=windowState&include=portletMode&mime-type=text/html"></a>
<div id="layoutContainers" class="wpthemeLayoutContainers wpthemeLayoutContainersHidden" role="main">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_layout"></a>
<div class="wpthemeClear"></div>
</div>
</div>
</div><!--end main content-->
d) Locate the HTML that displays the footer and add this dynamic-content spot block after the footer div at the end of the body:
<!-- active site analytics additions -->
<a rel="dynamic-content" href="dyn-cs:id:7002theme_asa"></a>
<!-- This is responsible for bootstrapping the configuration for the javascript framework.
This is located here instead of the head section to improve client performance. -->
<a rel="dynamic-content" href="co:config"></a>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=http://www.w3.org/1999/xhtml">
<head>
<link rel="dynamic-content" href="co:head">
<link rel="dynamic-content" href="dyn-cs:id:7002theme_head">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Chocolate Brown by Free CSS Templates</title>
<link href="style.css" rel="stylesheet"
type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<h1>
<a href="#">Chocolate Brown </a>
</h1>
<p>design by
<a href=http://www.freecsstemplates.org/">Free CSS Templates</a>
</p>
</div>
<div class="wpthemeClear"></div>
<header role="banner">
<div class="wpthemeHeader">
<div class="wpthemeInner">
<!-- responsible for the top most navigation links (horizontal list) -->
<a rel="dynamic-content" href="dyn-cs:id:7002theme_topNav"></a>
<!-- displays the page mode toggle to place the page into edit mode or view mode -->
<a rel="dynamic-content" href="dyn-cs:id:7002theme_pageModeToggle"></a>
</div>
</div><!-- end header -->
<div class="wpthemeBanner">
<div class="wpthemeBannerInner">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_primaryNav"></a>
<a rel="dynamic-content" href="dyn-cs:id:7002theme_commonActions"></a>
<div class="wpthemeClear"></div>
</div>
</div>
</div><!--end main banner-->
<div class="wpthemeSecondaryBanner">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_secondaryNav"></a>
<div class="wpthemeClear"></div>
</div>
</div><!--end secondary banner-->
</header>
</div>
<!-- end #header -->
<div id="menu">
</div>
<!-- end #menu -->
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="wpthemeMainContent">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_crumbTrail"></a>
<div class="wpthemeClear"></div>
<div id="wpthemeStatusBarContainer"></div>
</div> <!-- required - do not remove -->
<a rel="dynamic-content" href="state.portlet:portlet?include=windowState&include=portletMode&mime-type=text/html"></a>
<div id="layoutContainers" class="wpthemeLayoutContainers wpthemeLayoutContainersHidden" role="main">
<div class="wpthemeInner">
<a rel="dynamic-content" href="dyn-cs:id:7002theme_layout"></a>
<div class="wpthemeClear"></div>
</div>
</div>
</div><!--end main content-->
</div>
<!-- end #content -->
<div id="sidebar">
<ul>
<li>
<h2>Aliquam tempus</h2>
<p>Mauris vitae nisl nec metus placerat perdiet est. Phasellus dapibus semper
urna ornare consectetuer hendrerit.</p>
</li>
<li>
<h2>Categories</h2>
<ul>
<li>
<a href="#">Uncategorized</a>(3)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">Lorem Ipsum</a>(42)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">Urna Congue Rutrum</a>(28)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">Vivamus Fermentum</a>(13)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
</ul>
</li>
<li>
<h2>Blogroll</h2>
<ul>
<li>
<a href="#">Phasellus Pellentesque</a>
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">Consectetuer Adipiscing</a>
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">Urna Congue Rutrum</a>
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
</ul>
</li>
<li>
<h2>Archives</h2>
<ul>
<li>
<a href="#">December 2009</a> (29)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">November 2009</a> (30)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
<li>
<a href="#">October 2009</a> (31)
<span>Lorem Ipsum Dolor Sit Amit</span>
</li>
</ul>
</li>
</ul>
</div>
<!-- end #sidebar -->
<div style="clear: both;"> </div>
</div>
</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
<p>Copyright (c) 2008 Sitename.com. All rights reserved. Design by
<a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
<!-- end #footer -->
<!-- active site analytics additions -->
<a rel="dynamic-content" href="dyn-cs:id:7002theme_asa"></a>
<!-- This is responsible for bootstrapping the configuration for the javascript framework.
This is located here instead of the head section to improve client performance. -->
<a rel="dynamic-content" href="co:config"></a>
</div>
</body>
</html>
7. Create a new skin that matches the design [figure 2 below] (see also:Make a unique copy of the static resources for your skin):
a) Mount the /skinlist webDAV entry point:
/wps/mycontenthandler/dav/skinlist/
b) Copy the "ibm.portal.7002Standard" folder to a temporary location on your hard drive
c) Rename the folder, for this example it will be called “chocolate.skin”
d) Open "./chocolate.skin/metadata/localized_<locale>.properties" and change the skin display name:
title=Chocolate Skin
e) Find the HTML in "theme.html" which surrounds a portlet or widget. For chocolate, it looks like this:
<div class="post">
<div class="post-bgtop">
<div class="post-bgbtm">
<h2 class="title"><a href="#">TITLE IS HERE</a></h2>
CONTENT IS HERE
</div>
</div>
</div>
Replace the contents of "./chocolate.skin/skin.html" with the code above.
f) Add the dynamic spots for title and layout control body:
i. Replace “TITLE IS HERE” with
<a rel="dynamic-content" href="lm:title"></a>
ii. Replace “CONTENT IS HERE” with
<a rel="dynamic-content" href="lm:control"></a>
<div class="post">
<div class="post-bgtop">
<div class="post-bgbtm">
<h2 class="title"><a href="#"><a rel="dynamic-content" href="lm:title"></a></a></h2>
<a rel="dynamic-content" href="lm:control"></a>
</div>
</div>
</div>
h) Use the "Themes and Skins" portlet to set the Chocolate Skin as the default for the Chocolate Theme
When you are finished with this tutorial, your external CSS template should now function as a Portal theme.
- Using external CSS site templates with 7.0.0.2
- Build a basic responsive site with CSS
- Using Templates With the ASP.NET Repeater Control...
- External Site Monitoring Services
- SharePoint 2010 中的站点模板(Site Templates)
- Using External Version Control Systems with Unity【使用第三方版本控制工具】
- Hybrid computing using a neural network with dynamic external memory(可微神经计算机)阅读
- 基于神经网络的混合计算(DNC)-Hybrid computing using a NN with dynamic external memory
- hybrid computing using a neural network with dynamic external memory 论文阅读
- Using OLE DB Consumer Templates
- Using OLE DB Consumer Templates
- Implement Interface Mechanism Using Templates
- 5.4.2 Using Hibernate templates
- Using Multiple Templates【Drupal CMS】
- Easy Starter Css Templates
- Site-to-site using rsa-encrypted
- ZendStudio Using external web browser
- Using OLE DB Consumer Templates(转)
- 学习Spring必学的Java基础知识----反射
- 详解TP-Link路由器设置(图解)
- 大牛benjurry等人对当前互联网公司安全团队的点评
- Posix多线程编程学习笔记(六)—共享内存(1)
- IAR for AVR 历史版本说明总结(为你的例子程序找到对应的编译版本)
- Using external CSS site templates with 7.0.0.2
- linux 下执行sh dkfdailyreport.sh没问题,用crontab定时执行有问题
- Linux_不挂断地运行命令(后台运行)_nohup
- 得到泛型的class
- java中重写和重载
- 程序员看经济危机
- 小石头课堂(一)查询语句顺序及外连接
- Axis2 WebService的发布和调用说明
- LVM