<div><div>Victor, <br></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">If you would like to customize the theming of a view, use the &quot;theming wizard&quot;.
</blockquote><div><br>I&#39;m not trying to theme a view. That&#39;s easy enough to do. My problem is that there is a graphical element in page.tpl.php which changes depending on the webpage (which is defined via a cck field on the node).
<br></div>&nbsp;</div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">It generates 3 pieces of code, namely code to insert into template.php</blockquote>
<div><br>Thats kind of the problem. The view is generated and inserted into the $content variable. So at the hook=page level, I can&#39;t access any of the properties of the nodes included in the view.<br><br><br><br>-john
<br></div><br><br><div><span class="gmail_quote">On 10/5/07, <b class="gmail_sendername">Victor Kane</b> &lt;<a href="mailto:victorkane@gmail.com">victorkane@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you would like to customize the theming of a view, use the &quot;theming wizard&quot;.<br><br>It generates 3 pieces of code, namely code to insert into template.php (generates the necessary variables and a callback function which invokes the php template file), a php template file which generates the semantic html for the view, and a css file.
<br><br>Alternatively, you can invoke the view programatically in the page php template file, either with op &quot;embed&quot; to just insert the view somewhere on the page, or as &quot;item&quot; (see views_build_views comments in 
views.module), which will send you a hash of data which you can use as you like.<br><br>The best views documentation can be found in the handbooks here:<br><br><a href="http://drupal.org/node/109604" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://drupal.org/node/109604
</a><br><br>It includes tutorials and is worth going over with a fine toothcomb.<br><br>If you spend a day or so going over this documentation, you will be well-equipped to solve your problem using a variety of methods, and you will have a better foundation for future projects, rather than just seeking a quick fix.
<br><br>saludos,<br><span class="sg"><br>Victor Kane<br><a href="http://awebfactory.com.ar" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://awebfactory.com.ar</a></span><div><span class="e" id="q_1157042d62242a19_2">
<br><br><div><span class="gmail_quote">On 10/5/07, <b class="gmail_sendername">John Barreiros</b> &lt;<a href="mailto:johnbarreiros2@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
johnbarreiros2@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks for the note Sean.<br><br>I do create a custom body class which corresponds to the page, but I&#39;m not sure that will help me. All is well when working with and viewing a single node. I can define the image and it displays nicely in the upper right corner. But, when I&#39;m viewing a view, there doesn&#39;t seem to be a way to define the image to display in that upper right corner.
<br><span><br>-John</span><div><span><br><br><div><span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">Sean Robertson</b> &lt;<a href="mailto:seanr@ngpsoftware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

seanr@ngpsoftware.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can get around that using CSS.&nbsp;&nbsp;Assuming you&#39;ve placed the image in<br>div#image set #news div#image img {display:none;} and then #news<br>div#image {background:...}.&nbsp;&nbsp;I&#39;ve got php code that will assign and ID
<br>and classes to the body tag based on which page you&#39;re on if you need<br>help with that part of it.<br><br><br><br>John Barreiros wrote:<br>&gt; Thanks for the response Larry. I&#39;m trying to wrap my head around your
<br>&gt; solution, which for the most part makes sense. My only question is, does<br>&gt; it work if you&#39;re viewing a &quot;view&quot; page? For example, I navigate to the<br>&gt; &quot;news&quot; page which is just a view displaying the last 10 news nodes. Will
<br>&gt; the sidebar block display an image?<br>&gt;<br>&gt; thanks again.<br>&gt;<br>&gt; On 10/4/07, *Larry Garfield* &lt;<a href="mailto:larry@garfieldtech.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

larry@garfieldtech.com</a><br>&gt; &lt;mailto:<a href="mailto:larry@garfieldtech.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
larry@garfieldtech.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Funny you should mention it.&nbsp;&nbsp;I just got around to documenting the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; way we<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; tackle this issue at Palantir today:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://drupal.org/node/180852" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">


http://drupal.org/node/180852</a><br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; As for the Views, create a node type that has nothing but a title and<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Viewfield CCK type.&nbsp;&nbsp;Create a node of that type and specify the View<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; to use.
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Tada, you have a node.&nbsp;&nbsp;Note: Doesn&#39;t work with dynamic arguments,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; sadly. :-(<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Cheers.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; On Thursday 04 October 2007, John Barreiros wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Hi All.
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; This particular site I&#39;m building features a layout with a photo<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; in the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; upper right corner. The client wants to have the ability to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; specify the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; image on every single page. I know I know, kind of whacked, but<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; it&#39;s what<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; they want.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; So, first step was to use cck to add a new field to the &quot;page&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; type. I<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; tried imagefield but didn&#39;t like how you couldn&#39;t select an<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; existing image.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; I managed to whip together a new cck field which uses IMCE to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; select the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; image (I&#39;ll up it to cvs after some more testing and some<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; coworkers give me<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; the thumbs up on its quality).<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Okay, so that takes care of any pages displaying a single node.
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; How do I handle views? There are a few views and they obviously<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; need to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; have the image customizable. It&#39;d be nice if when creating a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &quot;view&quot; to
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; provide a page, it inherited the cck fields from the &quot;page&quot; type.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Could I use form_alter to add the cck field to the views form?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Or is there some way when the &quot;view&quot; is being built I can extract
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; the image<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; from the first node and pass it to page.tpl.php?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Any help would be appreciated. Thanks in advance.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; -john<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; --
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Larry Garfield&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AIM: LOLG42<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:larry@garfieldtech.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">larry@garfieldtech.com</a> &lt;mailto:<a href="mailto:larry@garfieldtech.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

larry@garfieldtech.com</a>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ICQ:
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 6817012<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &quot;If nature has made any one thing less susceptible than all others of<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; exclusive property, it is the action of the thinking power called an<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; idea,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; which an individual may exclusively possess as long as he keeps it to
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; himself; but the moment it is divulged, it forces itself into the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; possession<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; of every one, and the receiver cannot dispossess himself of it.&quot;&nbsp;&nbsp;--<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thomas<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Jefferson
<br>&gt;<br>&gt;<br><br>--<br>Sean Robertson<br>Web Developer<br>NGP Software, Inc.<br><a href="mailto:seanr@ngpsoftware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">seanr@ngpsoftware.com</a>

<br>(202) 686-9330<br><a href="http://www.ngpsoftware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.ngpsoftware.com
</a><br></blockquote></div><br>
</span></div></blockquote></div><br>
</span></div></blockquote></div><br>