How to call a html document/ file/page from ZPT

5 messages Options Options
Embed this Post
Permalink
Gautam Saha () How to call a html document/ file/page from ZPT
Reply Threaded MoreMore options
Print post
Permalink
Hi :

It may be very simple, but I do't know how to  call/display a simple
html page (plone Document or Document) from a zope page template.
I have hundreds of html pages (File, plone Document, Document) that I
want to
call from some ZPTs.

I saw some example on how to call a DTML method but not a
 simple html., e.g.:

<span tal:replace="structure python:here.yourDTMLMethod(here,request)"></span>

I tried:
<span tal:replace="structure python:here.page1(here,request)"></span>

page1 is the id of my simple html Document.


Any help is greatly appreciated.

Gautam




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Carlo Capuano () RE: How to call a html document/ file/page from ZPT
Reply Threaded MoreMore options
Print post
Permalink

Hi
 
> It may be very simple, but I do't know how to  call/display a simple
> html page (plone Document or Document) from a zope page template.
> I have hundreds of html pages (File, plone Document, Document) that I
> want to
> call from some ZPTs.

I don't know if I had understood correctly the question
But let's say that you got a content MyContent with a property
'someText' witch is a RichText field

In this case

<span tal:content="structure python: MyContent.getSomeText()"> html code
from the field </span>

Is how you put it into the page

If you got a document you can use get_data method have back the file

Carlo
 
what is ITER? www.iter.org



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Gautam Saha () Re: How to call a html document/ file/page from ZPT
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by Gautam Saha
J Cameron Cooper wrote:

>
>
> You need not make it so hard. Just call it::
>
>   <span tal:replace="structure here/page1"></span>
>
>        

Thanks for the nice tip, but when I call 2 pages, while rendering, it
repeats the header (logo) and the
the prtlets ( I have only navigation portlet on the left). e.g.
<span tal:replace="structure here/page1"></span>
<span tal:replace="structure here/pag21"></span>

Is there any way I can render only the html contents in those 2 pages in
my zpt?
(my page1 and 2 are "plone Document" type. I'm in Zope275/Plone205).

Gautam



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
J Cameron Cooper-3 () Re: How to call a html document/ file/page from ZPT
Reply Threaded MoreMore options
Print post
Permalink
Gautam Saha wrote:

> J Cameron Cooper wrote:
>>
>> You need not make it so hard. Just call it::
>>
>>   <span tal:replace="structure here/page1"></span>
>
> Thanks for the nice tip, but when I call 2 pages, while rendering, it
> repeats the header (logo) and the
> the prtlets ( I have only navigation portlet on the left). e.g.
> <span tal:replace="structure here/page1"></span>
> <span tal:replace="structure here/pag21"></span>
>
> Is there any way I can render only the html contents in those 2 pages in
> my zpt?
> (my page1 and 2 are "plone Document" type. I'm in Zope275/Plone205).

<span tal:replace="structure here/pag21/getBody"></span>

or maybe

<span tal:replace="structure here/pag21/CookedBody"></span>

                --jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Gautam Saha () Re: How to call a html document/ file/page from ZPT
Reply Threaded MoreMore options
Print post
Permalink
J Cameron Cooper wrote:

>
> <span tal:replace="structure here/pag21/getBody"></span>
>
> or maybe
>
> <span tal:replace="structure here/pag21/CookedBody"></span>
>
>      

/CookedBody worked great.!!

This is a cool way to call and render  any html page in your plone site.
Thanks for all the help.

Gautam
http://21cif.imsa.edu



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users