Add or remove parts of the article

Phoca PDF - creating PDF documents in Joomla! CMS
gulp
Phoca Member
Phoca Member
Posts: 33
Joined: 09 Oct 2012, 12:45

Add or remove parts of the article

Post 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 ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Add or remove parts of the article

Post 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
If you find Phoca extensions useful, please support the project
Post Reply