By Emanuel Rosenzweig on Sunday, 22 May 2016
Posted in General
Replies 9
Likes 0
Views 582
Votes 0
I need to edit the print layout (add the cover picture, remove tags etc...).

I believe it should be edited by setting options in a specific layout setting tab or as a layout>category panel.
The direction of the print document should pick the direction of the blog entry (in my case, most of the time RTL and sometimes LTR).

Anyway, until you'll add these features, if at all, it should be possible to override the default.print.php file.

Somehow, though I can override the default.php and field.php files in the mytemplate/html/com_easyblog/themes/mytheme/blog/entry folder, modifying the default.print.php file in the same folder has no influence.

What actually works is hacking the components/com_easyblog/themes/wireframe/blog/entry/default.print.php. Wireframe is not my default template and anyway - this is a hack which of course I prefer to avoid.
The override problem is an issue I mentioned in other threads before.
You should put this default.print.php file into this following override path : JoomlaFolder\templates\yourTemplate\html\com_easyblog\blogs\entry\default.print.php
·
Monday, 23 May 2016 10:58
·
0 Likes
·
0 Votes
·
0 Comments
·
OK. This explains a lot!!!
Now I checked with many other files I wanted to override before, which originally I put in the custom theme folder and they didn't work.
Arranging them directly in the my_emplate/html/com_easyblog/ folder (as you pointed for the printing file) now works

Thanks!!

Suggestion:
I managed to override the default.print.php with detection of the language and pulling the cover image to plant it in the printed version of the post. It is not just setting simple HTML tags and I'm not sure everybody can do it. So I do suggest to add the options to enhance the print output.

Thanks again,
Emanuel
·
Monday, 23 May 2016 18:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Emanuel,

Hm, not really sure what do you mean about detecting the language and setting it in default.print.php . The text direction of the document will be dependent on the html structure of the page. Am I missing anything here?
·
Tuesday, 24 May 2016 00:03
·
0 Likes
·
0 Votes
·
0 Comments
·
The printed version doesn't use the site's template, therefore the html and body tags don't include the language/direction of the site.

In the override file I found the language definition of the entry category ($post->category->language) and added a div container around the entire output with the correct dir according to the relevant languages of my site.
·
Tuesday, 24 May 2016 00:20
·
0 Likes
·
0 Votes
·
0 Comments
·
The print version uses tmpl=component and it does render the template's component.php file. If the component.php does not render the text-directions, then it is a problem with the template

For an example, please view /templates/protostar/component.php
·
Tuesday, 24 May 2016 01:38
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, this is something I have to check. Thanks for the direction.
Any way, due to the issue, I had to study the output of $post, so now I can do much more

What I'm not sure about is this:
The link that the print produces doesn't stop at the ?tmpl=component. it keeps on with
?tmpl=component&print=1&format=print

The format=print removes the html and body tags completely and leaves the default.print.php output only...
is this my template issue?

Thank you very much,
Emanuel.
·
Tuesday, 24 May 2016 02:53
·
0 Likes
·
0 Votes
·
0 Comments
·
It needs to have format=print because otherwise, you have your entire Joomla template displayed on the print page. The print page is meant to display a printer friendly page. This same behavior is also applicable to Joomla's very own print button on articles
·
Tuesday, 24 May 2016 13:21
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, I understand that.
But this is what takes all of the language/directions from the template/component infrastructure.
Therefore the language/direction should be defined separately, not based on the default joomla template system.

As said, I solved it by using the override file and detecting the category's language,
But it will be easier if it will be defined in the Easyblog output of the content. Maybe wrapping div as I did.

Thanks!
·
Tuesday, 24 May 2016 19:30
·
0 Likes
·
0 Votes
·
0 Comments
·
I don't really understand what you mean here but EasyBlog does not generate the html / body / head tags. These are defined by the template.
·
Wednesday, 25 May 2016 00:54
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post