门户组件定制

发布于 2024-12-27 11:54:53 字数 2035 浏览 0 评论 0原文

我开发了一个包含 portlet 集合的网页。有什么方法可以允许用户自定义 portlet(例如调整大小/删除/更改颜色方案)并使页面在用户下次登录时显示自定义布局,而不是显示默认布局和样式?

任何提示或现有示例将不胜感激。

  <body>
  <div class="demo">
  <div class="header" ><img src="css/images/logo.gif" style="height=100px;width:100px;"/>
  <label class="hd"> Template</label>
   <hr>
  <div class="column" id="col0">
   <div class="portlet" id="p_0">
    <div class="portlet-header">Feeds<a  class="edit" href="#p_0"></a></div>
    <div class="portlet-content">
                Keep Checking this space for latest Feeds
    </div>
            </div>

     <div class="portlet" id="p_1">
     <div class="portlet-header">News<a  class="edit" href="#p_1"></a></div>
    <div class="portlet-content"></div>
             </div>
    <div class="portlet" id="p_2">
    <div class="portlet-header">Inbox<a  class="edit" href="#p_2"></a></div>
<div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing         elit</div>
     </div>
     </div>

    <div class="vsprt">
    <IMG SRC="css/images/div.png" WIDTH="1" HEIGHT="65%" BORDER="0">
    </div>

    <div class="column" id="col1">
    <div class="portlet" id="p_3" >
    <div class="portlet-header">Table Widget<a  class="edit" href="#p_3"></a></div>
    <div class="portlet-content zoom" id="tb">
     </div>
     </div>
     <div class="portlet" id="p_4">
     <div class="portlet-header">Announcements</div>
     <div class="portlet-content">No Latests Announcements to display</div>
     </div>
     </div>
     <img src="css/images/footer.gif" WIDTH="100%" height="10px" style="padding-            top:20px;margin-top:-200px"/>
     </div><!-- End demo -->
     </body>
     </html>

I have devloped a webpage that has a collection of portlets. Is there any way I can allow a user to customize the portlets (for example resize/remove/change color scheme) and hve the page show the customised layout next time the user logs in, rather than showing up the default layout and styling?

Any hints or an existing example will be appreciated.

  <body>
  <div class="demo">
  <div class="header" ><img src="css/images/logo.gif" style="height=100px;width:100px;"/>
  <label class="hd"> Template</label>
   <hr>
  <div class="column" id="col0">
   <div class="portlet" id="p_0">
    <div class="portlet-header">Feeds<a  class="edit" href="#p_0"></a></div>
    <div class="portlet-content">
                Keep Checking this space for latest Feeds
    </div>
            </div>

     <div class="portlet" id="p_1">
     <div class="portlet-header">News<a  class="edit" href="#p_1"></a></div>
    <div class="portlet-content"></div>
             </div>
    <div class="portlet" id="p_2">
    <div class="portlet-header">Inbox<a  class="edit" href="#p_2"></a></div>
<div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing         elit</div>
     </div>
     </div>

    <div class="vsprt">
    <IMG SRC="css/images/div.png" WIDTH="1" HEIGHT="65%" BORDER="0">
    </div>

    <div class="column" id="col1">
    <div class="portlet" id="p_3" >
    <div class="portlet-header">Table Widget<a  class="edit" href="#p_3"></a></div>
    <div class="portlet-content zoom" id="tb">
     </div>
     </div>
     <div class="portlet" id="p_4">
     <div class="portlet-header">Announcements</div>
     <div class="portlet-content">No Latests Announcements to display</div>
     </div>
     </div>
     <img src="css/images/footer.gif" WIDTH="100%" height="10px" style="padding-            top:20px;margin-top:-200px"/>
     </div><!-- End demo -->
     </body>
     </html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝不服输 2025-01-03 11:54:53

我认为您有两个选择:

将首选项保存在数据库表或 Cookie 中。对于后者,请参阅此链接这很好地解释了如何以这种方式存储用户自定义内容。

如果您需要编码方面的帮助,您可以发布一些代码(我们不知道您如何实现您的 portets)。

I think that you have two options :

Saving the preferences in a database table or in Cookies. For the latter, refere to this link which explains very well how to store your user customizations in that way.

You can post some code if you want some help in coding (we don't know how you implemented your portets).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文