Re: [Zope] extract page title

2007-04-25 Thread Dean Hale


Hello all,

Thanks very much for all of your help.

thanks
dean

On 24 Apr 2007, at 16:20, Andreas Jung wrote:



--On 24. April 2007 09:56:41 -0500 Jeff Rush <[EMAIL PROTECTED]> wrote:



I don't see above him putting a  tag within the   
tag.  He
wants to put the *value* of the  tag inside the <script>  
</tt><tt>tag.  It
</tt><tt>seems some form of a string: expression would do it, assuming the  
</tt><tt>title
</tt><pre style="margin: 0em;">
is not literally in the zpt but rather expanded from a variable.

<script language='JavaScript1.1' type='text/javascript'>
 <noscript>
<img tal:attributes="src
<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.${title_or_id}"">http://domain/xxx/xxx/s?websitename.${title_or_id}"</a>;  width="1"
height="1" alt="" />
</noscript>




As far as I can recall: you can't use TALES within a SCRIPT block.
That's why you must generate your stuff outside inside a script.

-aj


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

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg28335.html">Re: [Zope] extract page title</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20070424&o=newest&f=1">2007-04-24</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+extract+page+title%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>


Hi Andreas,

Thanks - i know the title does not belong in a script tag, i just  
want the text within the title tag appended within the javascript,  
not the tags themselves. Sorry its my explanations for help that are  
unclear.


thanks
dan

On 24 Apr 2007, at 15:35, Andreas Jung wrote:



--On 24. April 2007 15:25:24 +0100 Dean Hale  
<[EMAIL PROTECTED]> wrote:




Hi Andreas,

Thanks, will try

basically if i have some zpt pages with the tiltle

INTRODUCTION

ABOUT

somehow within below the page title should be appended after
'websitename.'



<noscript>
<img src="<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.INTRODUCTION"">http://domain/xxx/xxx/s?websitename.INTRODUCTION"</a>;
width="1" height="1" alt="">
</noscript>





<noscript>
<img src="<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.ABOUT"">http://domain/xxx/xxx/s?websitename.ABOUT"</a>;
width="1" height="1" alt="">
</noscript>



does this make more sense? thanks again.


no.

a  tag does not belong inside </pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg28333.html">Re: [Zope] extract page title</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20070424&o=newest&f=1">2007-04-24</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+extract+page+title%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>


Hi Andreas,

Thanks, will try

basically if i have some zpt pages with the tiltle

INTRODUCTION

ABOUT

somehow within below the page title should be appended after  
'websitename.'




<noscript>
<img src="<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.INTRODUCTION"">http://domain/xxx/xxx/s?websitename.INTRODUCTION"</a>;
width="1" height="1" alt="">
</noscript>





<noscript>
<img src="<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.ABOUT"">http://domain/xxx/xxx/s?websitename.ABOUT"</a>;
width="1" height="1" alt="">
</noscript>



does this make more sense? thanks again.

dean

On 24 Apr 2007, at 15:16, Andreas Jung wrote:



--On 24. April 2007 15:05:49 +0100 Dean Hale  
<[EMAIL PROTECTED]> wrote:



Hi

I'm trying to implement some web tracking code within a page template,
however a little stuck.

In the code below i'd like to append the page template - page title
between the  tags dynamically rather than having to manually  
add

to each page


<noscript>
<img src="<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.PAGETITLE"">http://domain/xxx/xxx/s?websitename.PAGETITLE"</a>;
width="1" height="1" alt="">
</noscript>




Please rephrase your posting. It's not easy to understand what your real
problem is (using TALES within the </pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg28331.html">[Zope] extract page title</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20070424&o=newest&f=1">2007-04-24</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+extract+page+title%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>

Hi

I'm trying to implement some web tracking code within a page  
template, however a little stuck.


In the code below i'd like to append the page template - page title  
between the  tags dynamically rather than having to manually  
add to each page



<noscript>
<img src="<a  rel="nofollow" href="http://domain/xxx/xxx/s?websitename.PAGETITLE"">http://domain/xxx/xxx/s?websitename.PAGETITLE"</a>;
width="1" height="1" alt="">
</noscript>


do you have any advise please on how this could be done?

thanks very much
dean



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

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg24967.html">Re: [Zope] cannot paste objects</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20060811&o=newest&f=1">2006-08-11</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+cannot+paste+objects%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>
Hi Dennis,Yes sorry i am logged in as manager.As to permissionsdrwxrwxr-x    3 webzope   root          456 Aug 11 14:28 vardrwxrwxr-x    2 webzope   root          136 Jul 27 08:09 logwhich is the same as what i have for previous versions of Zope 2.8 and below.webzope is the user i use to start zopethanksdeanOn 11 Aug 2006, at 16:59, Dennis Allison wrote:Dean,Have you checked permissions on the var and log directories in your instance?  Have you verified that the security settings give Managers proper authorization?When you say you are "Logged in as administrator" should we presumethat you are logged into the ZMI as a user with a "manager" role.On Fri, 11 Aug 2006, Andreas Jung wrote: Works for me as expected.-aj--On 11. August 2006 16:12:47 +0100 Dean Hale <[EMAIL PROTECTED]> wrote: HiA strange one here so any help appreciated.I have installed Zope 2.9.4-final, python 2.4.3 onto a linux box and  ican not paste any objects within the ZMI. I can copy an item  however thepaste button never appears. Logged in as administrator  etc so shouldhave the rights?thanksdean--University of Sunderland ??? life-changing: see our new TV advert athttp://www.lifechangingsunderland.com or http://www.sunderland.ac.uk  --   ---Dean HaleWeb Development ManagerUniversity of Sunderlandw: https://my.sunderland.ac.ukt: +44 (0) 191 515 2424f: +44 (0) 191 515 2904 
-- 
University of Sunderland – life-changing: see our new TV advert at
http://www.lifechangingsunderland.com or http://www.sunderland.ac.uk

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

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg24964.html">Re: [Zope] cannot paste objects</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20060811&o=newest&f=1">2006-08-11</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+cannot+paste+objects%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>
Hi Martijn,Yes they are have tried on both mac and pc and using firefox, ie and safari.ThanksdeanOn 11 Aug 2006, at 16:38, Martijn Pieters wrote:On 8/11/06, Dean Hale <[EMAIL PROTECTED]> wrote: I have installed Zope 2.9.4-final, python 2.4.3 onto a linux box and i cannot paste any objects within the ZMI. I can copy an item however the pastebutton never appears. Logged in as administrator etc so should have therights? Are cookies enabled?-- Martijn Pieters  ---Dean HaleWeb Development ManagerUniversity of Sunderlandw: https://my.sunderland.ac.ukt: +44 (0) 191 515 2424f: +44 (0) 191 515 2904 
-- 
University of Sunderland – life-changing: see our new TV advert at
http://www.lifechangingsunderland.com or http://www.sunderland.ac.uk

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

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg24959.html">[Zope] cannot paste objects</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20060811&o=newest&f=1">2006-08-11</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+cannot+paste+objects%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>
HiA strange one here so any help appreciated.I have installed Zope 2.9.4-final, python 2.4.3 onto a linux box and i can not paste any objects within the ZMI. I can copy an item however the paste button never appears. Logged in as administrator etc so should have the rights?thanksdean  
-- 
University of Sunderland – life-changing: see our new TV advert at
http://www.lifechangingsunderland.com or http://www.sunderland.ac.uk

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

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg23182.html">[Zope] pass variables in a form</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20060403&o=newest&f=1">2006-04-03</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+pass+variables+in+a+form%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>
Hi,I hope this is the correct forum to add this query, and any help appreciated.I have the following zpt which pulls in the users userid - $uid and some text generated from a python script (myEV - $pass). It works fine however i need to pass the variables along in a form rather than a url. And i'm stuck.the zpt url    https://domain/siw_sso.signonUSER=$uid&TEXT=$pass" method="post">SSO test       the form needs to be in a format similar to belowhttps://domain/siw_sso.signon"> This is a test of hardcoded single-signon so somehow i need to pass something like belowhope this makes sense and is it possible?thank youdean    --- Dean Hale  Web Development Manager Library Services  University of Sunderland  w: https://my.sunderland.ac.uk  t: +44 (0) 191 515 2424 f: +44 (0) 191 515 2904  ___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg22837.html">Re: [Zope] display results from external source in zpt</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20060315&o=newest&f=1">2006-03-15</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+display+results+from+external+source+in+zpt%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>
Hi Andreas,Thanks for this i'm trying to use an example belowfrom urllib import *url = ''">http://site.ac.uk/cgi-bin/evisiontasks?uid=xxx0xxx&fmt=plain'html = urlretrieve(url).read()however am receiving the errorError Value: "from urllib import *" is not allowedi have followed the readme in python/Products/PythonScripts and created a __init__.py file and it has created a __init__.pyc file once the server has restated.I'm assuming i need to add some extra details to the __init__.py file is this correct and if so have you any ideas what they would befrom Products.PythonScripts.Utility import allow_moduleallow_module('urllib')Sorry if the answer is obvious.thanksdeanOn 15 Mar 2006, at 09:23, Andreas Jung wrote:--On 15. März 2006 09:14:42 + Dean Hale <[EMAIL PROTECTED]> wrote: tal:attributes="hrefstring:http://site.ac.uk/cgi-bin/tasks?uid=$uid&fmt=plain">viewresults Look at Python's urllib module.-aj   ---  -   Andreas Jung            ZOPYX Ltd. & Co KG                        - -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de         -  ------ Dean Hale  Web Development Manager Library Services  University of Sunderland  w: https://my.sunderland.ac.uk  t: +44 (0) 191 515 2424 f: +44 (0) 191 515 2904  ___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

</pre></span>
</blockquote><br>

<h3><span class=subject><a href="/zope@zope.org/msg22828.html">[Zope] display results from external source in zpt</a></span></h3>
<div class="darkgray font13">
<span class="sender pipe">
<span class=date><a href="/search?l=zope%40zope.org&q=date:20060315&o=newest&f=1">2006-03-15</a></span></span>
<span class="sender pipe">
<span class=thead><a href="/search?l=zope%40zope.org&q=subject:%22%5C%5BZope%5C%5D+display+results+from+external+source+in+zpt%22&o=newest&f=1">Thread</a></span></span>
<span class=name><a href="/search?l=zope%40zope.org&q=from:%22Dean+Hale%22&o=newest&f=1"><B>Dean</B> <B>Hale</B></a></span>
</div>
<blockquote><span class="msgFragment"><pre>


Hi,

Apologies if this is easy to do, cannot find any help in the archives 
(but then again not sure what to search for)


We currently run a script on an external server which returns results 
depending on the userid of the user, which is added to the link below 
once the user logs into zope.


It works and displays what is needed, however i would like to display 
the results somehow within a page template rather than the user having 
to go elsewhere to see the results.


tal:attributes="href 
string:http://site.ac.uk/cgi-bin/tasks?uid=$uid&fmt=plain";>view results


Basically we would like to run above somehow but all results are 
returned within the same page.


Hope this makes sense and is this possible?

thanks very much
dean
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )

</pre></span>
</blockquote><br>
    <h2></h2>
  </div>
  <div class="aside" role="complementary">
    <div class="logo">
      <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a>
    </div>
    <h2>10 matches</h2>
    <br>
    
<ul><li><a href="/search?l=zope%40zope.org&q=from%3A%22Dean+Hale%22&a=1&o=newest&f=1">Advanced search</a></li></ul>
<form class="overflow" action="/search" method="get">
<input type="hidden" name="l" value="zope@zope.org">
<label class="hidden" for="q">Search the list</label>
<input class="submittext" type="text" id="q" name="q" placeholder="Search zope" value="from:"Dean Hale"">
<input class="submitbutton" id="submit" type="image" src="/submit.png" alt="Submit">
</form>

    
    <div class="nav margintop" id="nav" role="navigation">
      <h2 class="hidden">
                               Site Navigation
      </h2>
      <ul class="icons font16">
        <li class="icons-home"><a href="/">The Mail Archive home</a></li>
        <li class="icons-list">
          <a href="/zope@zope.org" title="c" id="c">zope - all messages</a></li>
        <li class="icons-about">
          <a href="/zope@zope.org/info.html">zope  - about the list</a></li>
        <li class="icons-expand"><a href="/search?l=zope%40zope.org&q=from%3A%22Dean+Hale%22&o=newest" title="e" id="e">Expand</a></li>
      </ul>
    </div>

    <div class="listlogo margintopdouble">
      <h2 class="hidden">
  				Mail list logo
      </h2>
      
    </div>
  </div>
  <div class="footer" role="contentinfo">
    <h2 class="hidden">
	        	      Footer information
    </h2>
    <ul>
      <li><a href="/">The Mail Archive home</a></li>
      <li><a href="/faq.html#newlist">Add your mailing list</a></li>
      <li><a href="/faq.html">FAQ</a></li>
      <li><a href="/faq.html#support">Support</a></li>
      <li><a href="/faq.html#privacy">Privacy</a></li>
    </ul>
  </div>
<script language="javascript" type="text/javascript">
document.onkeydown = NavigateThrough;
function NavigateThrough (event)
{
  if (!document.getElementById) return;
  if (window.event) event = window.event;
  if (event.target.tagName == 'INPUT') return;
  if (event.ctrlKey || event.metaKey) return;
  var link = null;
  switch (event.keyCode ? event.keyCode : event.which ? event.which : null) {
    case 69:
      link = document.getElementById ('e');
      break;
    }
  if (link && link.href) document.location = link.href;
}
</script>
</body>
</html>