[Zope] personalize Home Page

eric.n.dunn@bankofamerica.com eric.n.dunn@bankofamerica.com
Wed, 05 Jun 2002 10:28:20 -0400


1.  <dtml-with expr="CMF">

... CMF is just a ID of the "CMF SIte" product.  You can give any ID to a
"CMF Site"  i.e.  "BobsBigCMFsite"

The code would then be:
<dtml-with expr="BobsBigCMFsite">

Prerequisites:  I have the CMF 1.2 Product installed

2.  <dtml-var cmf_news>

"cmf_news" is another created name of a "DTML Method" I created.
I found the code in my default CMF Site at:
CMF SIte/portal_skins/generic/recent_news

note:  you may have to hack out/in any code you don't want in your
presentation layer.  I only removed the
<dtml-var standard_html_header> and <dtml-var standard_html_footer>

Copy this code (CMF SIte/portal_skins/generic/recent_news) to a DTML Method
at the root of your CMF Site.
Don't name it "recent_news"

3.  </dtml-with>  close the tag

4.  Here is my code from my front page (index_html)

<div align="center">
  <center>
<dtml-var standard_html_header>
<dtml-var yihaw_toplevel>
<dtml-var standard_html_footer>
</center>
</div>

5.  <dtml-var yihaw_toplevel>

<table border="0" width="100%" cellspacing="5" cellpadding="5">
            <tr>
              <td width="100%">

<dtml-comment>
My squishdot site articles pulled to my home page. madsquish and
articles_html are ID's I created.
</dtml-comment>

              <dtml-with expr="madsquish">
              <dtml-var articles_html>
              </dtml-with>

              </td>
            </tr>
            <tr>
              <td width="100%" bgcolor="#D9D9D9">
              <font size="3"><hr size="5" noshade color="#000080"></font>
              </td>
            </tr>
            <tr>
              <td width="100%" bgcolor="#D9D9D9">
              <font color="#000000" size="3">
              </font>
              </td>
            </tr>
            <tr>
              <td width="100%" bgcolor="#D9D9D9">
              <font size="3"><hr size="5" noshade color="#000080"></font>
              </td>
            </tr>
            <tr>
              <td width="100%" bgcolor="#D9D9D9">

<dtml-comment>
My CMF Site News Articles pulled to my home page.  MADG and MADG_news are
ID's I created
</dtml-comment>

              <dtml-with expr="MADG">
         <dtml-var MADG_news>
           </dtml-with>

              </td>
            </tr>
            <tr>
              <td width="100%" bgcolor="#D9D9D9">
               &nbsp;
              </td>
            </tr>
          </table>






"Santagostino Pretina, Luca" <lsantagostino@activa3.net> on 06/05/2002
03:15:53 AM

To:   Eric N. Dunn/USA/BAC@BankofAmerica
cc:   zope@zope.org
Subject:  RE: [Zope] personalize Home Page



Hi eric
thanks for your answers, but I am encountering problem in understanding
it...(forgive me but I'm really new to zope..)

this is your code:
<dtml-with expr="CMF">
         <dtml-var cmf_news>
           </dtml-with>

I don't understand if CMF stands for the name of my cmf_site or for the path
to my folder/object and in this case what is the object?
I mean, suppose I have an article in a folder called myFirstArticle and this
would be the path to it: cmf_site/MyNews/MyArticles/MyFirstArticle, and your
code becomes something like this:

<dtml-with expr="cmf_site/MyNews/MyArticles/MyFirstArticle">
         <dtml-var cmf_news>
           </dtml-with>

but then again: what is cmf_news? where do I get that variable from?
thanks again and I hope you or anyone else could help me with this.
thanks
Luca








-----Mensaje original-----
De: eric.n.dunn@bankofamerica.com [mailto:eric.n.dunn@bankofamerica.com]
Enviado el: martes, 04 de junio de 2002 14:03
Para: Santagostino Pretina, Luca
CC: zope@zope.org
Asunto: Re: [Zope] personalize Home Page




This is what I use to pull the last 3 dates from my squishdot site (without
stuff in parens)

<dtml-with expr="squishdot_site">    (squishdot folderish/object)
              <dtml-var articles_html>        (copied code from
"squishdot/rightbox_methods/prev_articles)
              </dtml-with>                             (close tag)

Same concept with my CMF site

<dtml-with expr="CMF">
         <dtml-var cmf_news>
           </dtml-with>


I pull both CMF News and Squishdot News to my front page.  Anyone posting to
 my CMF or Squishdot site will see there posting headline on the fron page.






"Santagostino Pretina, Luca" <lsantagostino@activa3.net> on 06/04/2002
06:35:31 AM

To:   "'zope@zope.org'" <zope@zope.org>
cc:
Subject:  [Zope] personalize Home Page



Hi list,
I am new to Zope and I am stuck with this problem:
I have created folders and subfolders and I now need to retrieve the content
of these subfolders and display it in the home page.
Let's say I have 4 different folders, each one has 3 subfolders and each
subfolder has a list of articles or news_items.
How can I import the content of the last article published in a specified
subfolders, in the homepage? or the last news_item published in a specified
subfolder into the index_html of the homepage?

thanks for helping
Luca


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )