Skip to content

Commit

Permalink
Reapply "Issue View Attachment in article view jmcameron#40"
Browse files Browse the repository at this point in the history
This reverts commit a05b3ed.
  • Loading branch information
JLTRY committed Apr 18, 2024
1 parent c316f6d commit b786f6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions attachments_for_content/attachments_for_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ protected function getTextFieldName(&$row, $parent_entity)
{
$text_field_name = 'text';
}

if (($view == 'article') AND ($layout == 'blog') AND ($parent_entity == 'article'))
{
$text_field_name = 'text';
}

return $text_field_name;
}
Expand Down
8 changes: 4 additions & 4 deletions attachments_plugin/attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ public function onContentPrepare(Event $event)
if ( $parent_type == 'com_content' )
{
if (in_array($parent_entity, Array('featured', 'article'))) {
return false;
}
$parent_entity = 'article';
}
if ($parent_entity == 'category.title') {
// Do not add attachments to category titles (Joomla 3 only)
return false;
}
}

$parent_entity = 'category';

}

$input = $this->app->getInput();
Expand Down

0 comments on commit b786f6f

Please sign in to comment.