Page 1 of 1

Add or remove parts of the article

Posted: 26 Nov 2014, 19:38
by gulp
Hi,
I'm trying to obtain some kind of "product sheets" by articles wrote in Joomla, but sometimes this sheet are sligtly different by the web,
I've to add some additional info or remove some unwanted.
How to obtain this kind of behaviour ?
What if I add a css class to text blocks like
this to show just on the web:

Code: Select all

<p class="hide-in-pdf">....</p>

this to show just on pdf:

Code: Select all

<p class="hide-in-web">....</p>


Do you think is there any other kind of solution ?

Re: Add or remove parts of the article

Posted: 28 Nov 2014, 20:39
by Jan
Hi, I think you need to customize it - in your CSS and before PDF creating:

- in CSS - you can easily hide the "hide-in-web" class ( .hide-in-web {display:none;})
- before PDF creating - you need to run some str_replace or preg_replace or other replace function function - to find the class and remove all the tag

:idea:

Jan