[Zope] personalize Home Page

Santagostino Pretina, Luca lsantagostino@activa3.net
Wed, 5 Jun 2002 17:03:51 +0200


Thanks Eric,
Eventually I figured it out this way:

<dtml-in expr=3D"Exterior.Noticies.objectItems()" size=3D2 reverse>
<dtml-if "meta_type =3D=3D 'Portal Article'">=20
<li><a href=3D"<dtml-var absolute_url>"><dtml-var title></a> <br>
<dtml-var description>
</li>
</dtml-if>
</dtml-in>

where Exterior.Noticies is the path to my folder.
The thing is, now, it seems I can't retrieve the TextElement object =
which
inside the article.
Suppose I have an article with an Image inside or a TextElement, how =
can I
access it the same way I did with title and description( <dtml-var
TextElement> doesn't work at all)?
do you have any idea?=20
thanks a lot
Luca

-----Mensaje original-----
De: eric.n.dunn@bankofamerica.com =
[mailto:eric.n.dunn@bankofamerica.com]
Enviado el: mi=E9rcoles, 05 de junio de 2002 16:28
Para: Santagostino Pretina, Luca
CC: zope@zope.org
Asunto: RE: [Zope] personalize Home Page




1.  <dtml-with expr=3D"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=3D"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=3D"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=3D"0" width=3D"100%" cellspacing=3D"5" cellpadding=3D"5">
            <tr>
              <td width=3D"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=3D"madsquish">
              <dtml-var articles_html>
              </dtml-with>

              </td>
            </tr>
            <tr>
              <td width=3D"100%" bgcolor=3D"#D9D9D9">
              <font size=3D"3"><hr size=3D"5" noshade =
color=3D"#000080"></font>
              </td>
            </tr>
            <tr>
              <td width=3D"100%" bgcolor=3D"#D9D9D9">
              <font color=3D"#000000" size=3D"3">
              </font>
              </td>
            </tr>
            <tr>
              <td width=3D"100%" bgcolor=3D"#D9D9D9">
              <font size=3D"3"><hr size=3D"5" noshade =
color=3D"#000080"></font>
              </td>
            </tr>
            <tr>
              <td width=3D"100%" bgcolor=3D"#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=3D"MADG">
         <dtml-var MADG_news>
           </dtml-with>

              </td>
            </tr>
            <tr>
              <td width=3D"100%" bgcolor=3D"#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=3D"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=3D"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=3D"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=3D"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 )