2

我是 Plone 5 的新手,实际上我正在接受 plone 培训。但是,我不习惯所有的构建方式。我想做一些简单的事情,但我不知道从哪里开始。例如:

  • 如何将搜索栏从标题移动到导航栏菜单?

  • 如何将图像添加到徽标旁边的标题中?

  • 有什么教程可以帮助我吗?

4

2 回答 2

1

您的大多数问题可能都可以通过官方教程和文档中的技术来回答。看:

于 2018-03-21T14:58:20.680 回答
0

您可以安装插件 Products.ContentWellPortlets 并用 portlet 替换 top-viewlet,方法是portlets.xml在插件的一个配置文件中添加一个。

此示例在其旁边添加徽标和图像:

<?xml version ="1.0"?>
<portlets>

 <!-- Assign Logo-portlet to site-root (key='/'): -->
 <assignment name="top" category="context" key="/"
    manager="ContentWellPortlets.InHeaderPortletManager1"
    type="plone.portlet.static.Static" visible="True">

  <!--
   Give this portlet a name, so we can recognize it easily in the
   portlet-management-UI via `[PLONESITE_URL]/manage-portletsinheader`:
   -->
  <property name="header">Logo</property>

  <!-- But don't show its header and footer when viewing the portlet: -->
  <property name="omit_border">True</property>

  <!-- Replace 'Plone' with your site-id here, in case it differs: -->
  <property name="text">
     &lt;a href="/Plone">
       &lt;img src="logo.png" />
     &lt;/a>
   </property>

 </assignment>

 <!-- Assign another portlet in next column (InHeaderPortletManager2): -->
 <assignment name="top" category="context" key="/"
    manager="ContentWellPortlets.InHeaderPortletManager2"
    type="plone.portlet.static.Static" visible="True">
  <property name="header">Some image next to Logo</property>
  <property name="omit_border">True</property>

  <property name="text">
    &lt;img src="defaultUser.png"
        title="Dummy-user-avatar" />
   </property>

 </assignment>

</portlets>

并用一些造型打磨它。

对于搜索框,我可以在内容上方分配一个搜索portlet(使用 ContentWellPortlets),给它一个负边距顶部,给 globnav 一个边距右边,但是因为有很多方法可以到达罗马,我会也可以用导航端口替换 globnav。

这是一个用于说明目的的附加组件(请参阅viewlets.xml如何隐藏顶部视图): https ://github.com/ida/adi/tree/master/adi.samplestructure

于 2018-03-29T09:26:47.593 回答