5minutsOfBullfight
5minutsOfBullfight

Reputation: 43

Add more information in a blog post page in Elgg

i need your precious help. How could i do if i want to display, for example, the description and the excerpt with their labels, in the blog-post page?? For default i can only see one information.

In /mod/blog/views/default/object/blog.php i found this:

if ($full) {

$body = elgg_view('output/longtext', array( 'value' => $blog->description, // it displays only description ( if i put "excertp" it displays the excerpt) 'class' => 'blog-post', ));

How can i add other info and labels as excerpt ,for example, to display??

Thank you so much

Upvotes: 0

Views: 342

Answers (1)

Jeff Tilson
Jeff Tilson

Reputation: 110

You've got two options:

  1. Extend the view
  2. Override the view

In your case, I'd recommending overriding the view (it's never a good idea to edit core files!)

I'd recommend checking out Elgg's view documentation:

http://docs.elgg.org/wiki/Engine/Views#Overriding_views_in_plugins

See the section about overriding views in plugins.

You'll basically need to create a new plugin, lets call it 'blogtweaks'.

(For more information regarding plugin development see: http://docs.elgg.org/wiki/Plugin_development)

Then, create your custom view file at:

/mod/blogtweaks/views/default/object/blog.php

This contents of this file will override the original, so just copy the contents of the orignal blog view (/mod/blog/views/default/object/blog.php) then edit to your heart's content.

Upvotes: 0

Related Questions