Have a minisite that contains a publication on a page that displays a
list of news posts including title, teaser image, and teaser text.
(See www.luther.edu/headlines).
Another minisite has borrowed the above publication and all displays
as before except the image, which does not display at all. By removing
$this->site_id from the entity selector on line 2151 of publication/
module.php the image appears in the borrowed publication. Don't know
if this behavior is by design or not but have overridden the
get_teaser_image function for our case.
Brian
function get_teaser_image($item)
{
$es = new entity_selector( );
$es->description = 'Finding teaser image for news item';
$es->add_type( id_of('image') );
$es->add_right_relationship( $item->id(),
relationship_id_of('news_to_teaser_image') );
$es->set_num (1);
$result = $es->run_one();
return $result;
On Wed, Dec 1, 2010 at 9:40 AM, Brian Jones <joneb...@gmail.com> wrote: > Hi,
> Have a minisite that contains a publication on a page that displays a > list of news posts including title, teaser image, and teaser text. > (See www.luther.edu/headlines).
> Another minisite has borrowed the above publication and all displays > as before except the image, which does not display at all. By removing > $this->site_id from the entity selector on line 2151 of publication/ > module.php the image appears in the borrowed publication. Don't know > if this behavior is by design or not but have overridden the > get_teaser_image function for our case.
> -- > You received this message because you are subscribed to the Google Groups "Reason Discussion" group. > To post to this group, send email to reason-discussion@googlegroups.com. > To unsubscribe from this group, send email to reason-discussion+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/reason-discussion?hl=en.
Brian, I think that your solution is good. I did add one "set_env" call, which future-proofs the code a little bit, but otherwise your suggestion is now in the core. You can update to the latest nightly if you'd like, or you can replace that function with this:
On Thu, Dec 2, 2010 at 1:41 PM, Matt Ryan <matt.d.r...@gmail.com> wrote: > Hi, Brian --
> Good catch. I will take a look at it; if you're correct (and I suspect > you are) I will make that change in the core.
> Matt
> On Wed, Dec 1, 2010 at 9:40 AM, Brian Jones <joneb...@gmail.com> wrote: >> Hi,
>> Have a minisite that contains a publication on a page that displays a >> list of news posts including title, teaser image, and teaser text. >> (See www.luther.edu/headlines).
>> Another minisite has borrowed the above publication and all displays >> as before except the image, which does not display at all. By removing >> $this->site_id from the entity selector on line 2151 of publication/ >> module.php the image appears in the borrowed publication. Don't know >> if this behavior is by design or not but have overridden the >> get_teaser_image function for our case.
>> -- >> You received this message because you are subscribed to the Google Groups "Reason Discussion" group. >> To post to this group, send email to reason-discussion@googlegroups.com. >> To unsubscribe from this group, send email to reason-discussion+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/reason-discussion?hl=en.