Support ⇒ Designer Dragonfly v10 ⇒ Invoke template without theme/header/footer? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDesigner Dragonfly v10

Invoke template without theme/header/footer? Reply to topic


I'm looking for a way to invoke a template without having the theme header and footer. I'm trying to create a "printer-friendly" page for Content Enhanced, and I want the template to just output the rendered part of the template.

It used to be possible with $cpgtpl->display(), but it looks like this behavior has changed in DF10 (either intentionally or unintentionally).

Is this a side-effect of changing to the XML template and moving it from /themes into the /module directory?

It is pitch black. You are likely to be eaten by a grue.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Ubuntu 12.04, Atom D525/Apache 2.2.22/MySQL 5.5.38/PHP 5.3.10/Dragonfly 9.4.0.0 CVS


Use CSS
@media print { /* code here */ }
As people can always hit Ctrl + P or File -> Print in the browser.
"printer friendly" page are "not done" in 2018

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Tue May 01, 2018 12:37 pm; edited 1 time in total


DJ Maze wrote
Use CSS
@media print { /* code here */ }
As people can always hit Ctrl + P or File -> Print in the browser.
"printer friendly" page are "not done" in 2018


I'm a barbarian. 😈

But, I'll give your suggestion a try. Thank you! =)

It is pitch black. You are likely to be eaten by a grue.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Ubuntu 12.04, Atom D525/Apache 2.2.22/MySQL 5.5.38/PHP 5.3.10/Dragonfly 9.4.0.0 CVS


Hahaha, well this change will have other benefits in the future.

For example, i wrote code to output as PDF.
It's not working in Dragonfly yet, but it works in my other CMS.
Take for example this page: mhxsolutions.nl/poodle.../templates
Now put ".pdf" after it: mhxsolutions.nl/poodle...plates.pdf
There you go, now you have a manual for TAL in PDF Smile
And that uses the "@media print"

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Sat May 05, 2018 11:08 pm; edited 1 time in total

All times are UTC


Jump to: