print.css - needing pointers on how to use
print.css - needing pointers on how to use
OK, although I have been around awhile with wcms
- have not really studied the print options that much
- and am confused about substituting/swapping frontend.css with print.css
(JUST WANT TO Have print.css TO CONTROL FINE-TUNED PRINT OUTPUT)
- basically looking at this for the first time
- so pointers on how some have done this appreciated
Right now the frontend.css stylesheets are being used
when I click the print button and the content opens in new window....
embarassed
- have not really studied the print options that much
- and am confused about substituting/swapping frontend.css with print.css
(JUST WANT TO Have print.css TO CONTROL FINE-TUNED PRINT OUTPUT)
- basically looking at this for the first time
- so pointers on how some have done this appreciated
Right now the frontend.css stylesheets are being used
when I click the print button and the content opens in new window....
embarassed
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
what do you think off something like this?
i allways make a copy of my frontend.css, fill in some display:none; /* <<< */ and throw away, what is not needed for the printout version of my pages.
That's MY solution of the "print problem" Not that elegent.... but works
Now there is the 2. css-file, to have an influence of the way, your output will look.<!-- ...../template/inc_default/print.tmpl revision: 2007.05.15
====================================================================
pepes "print.tmpl" used by the PRINT-RT of "phpwcms_130..."
====================================================================
//-->
<!-- If you don't want to use the default print_layout.css - in versions lt. 1.3.3 - load another stylesheet: print.css -->
<style type="text/css">
<!-- @import url("template/inc_css/print.css"); //-->
</style>
<div style="START of your print-wrapper here">
<div>Your header-text and/or imag here please.</div>
<!-- Output of - phpWCMS-content { CONTENT } -->
<div>{CONTENT}</div>
<!-- And if you need it...: It's possible, to print out other Fields - like the sidebars - too!
<div>{ LEFT}</div>
<div>{ RIGHT}</div>
<div>{ JOHNS_CUSTUM_BLOCK}</div>
//-->
<!-- Output of - URL -->
<div style="text-align:center; margin:10px 0;">URL of this page: {CURRENT_URL}</div>
<div>Your footer-text goes here.</div>
</div><!-- END of print-wrapper -->
i allways make a copy of my frontend.css, fill in some display:none; /* <<< */ and throw away, what is not needed for the printout version of my pages.
That's MY solution of the "print problem" Not that elegent.... but works
Last edited by pepe on Thu 17. May 2007, 12:37, edited 1 time in total.
Thanks Oli
for the suggestions AND template file
and
Thanks Pepe
for the further suggestions
Starting to understand - hehe
been modifying the content.func.inc.php file - to use a custom block as print template - similar in concept - another approach - but a hack:
Basically any named custom block: PRINT_ARTICLE
is adressed using $block['customblock_PRINT_ARTICLE']
Clearly using the provided print template is the better way - the reason I am using the other custom block approach is I am using two css layouts - one for list and one for full article - thus the need for two print templates...
for the suggestions AND template file
and
Thanks Pepe
for the further suggestions
Starting to understand - hehe
been modifying the content.func.inc.php file - to use a custom block as print template - similar in concept - another approach - but a hack:
Basically any named custom block: PRINT_ARTICLE
is adressed using $block['customblock_PRINT_ARTICLE']
Code: Select all
if($content['all']) {
$content["all"] = str_replace('{CURRENT_URL}', PHPWCMS_URL.'index.php'.returnGlobalGET_QueryString('htmlentities'), $content["all"]);
$content["all"] = str_replace('{CONTENT}', $block['customblock_PRINT_ARTICLE'], $content["all"]);
} else {
$content["all"] = str_replace('{CONTENT}', $block['customblock_PRINT_ARTICLE'], $content["all"]);
}
since 1.2.9? we are working with special List-templates!!!
With its own Classes! Default and custom as well !
So what, if you throw out all inline-styles, fill in your own special classes and then you are able to make all the formatting job inside your frontend.css and print_layout.css.
Using some sub-classes, it MUST be possible, to reach your target without any "code-cracking"!
And because you can choose different news-list.tmpl files inside the article basicinformation of the backend... you will start up to the moon
But it would be great, if OG would add an "additional argument" to th RT
{PRINT}PRINT{/PRINT}
something like:
{PRINT:MyOWNprint.tmpl}PRINT{/PRINT}
So we could choose different templates with its own print-solution...
With its own Classes! Default and custom as well !
So what, if you throw out all inline-styles, fill in your own special classes and then you are able to make all the formatting job inside your frontend.css and print_layout.css.
Using some sub-classes, it MUST be possible, to reach your target without any "code-cracking"!
And because you can choose different news-list.tmpl files inside the article basicinformation of the backend... you will start up to the moon
But it would be great, if OG would add an "additional argument" to th RT
{PRINT}PRINT{/PRINT}
something like:
{PRINT:MyOWNprint.tmpl}PRINT{/PRINT}
So we could choose different templates with its own print-solution...
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
sorry, print is just a comfortable way for customers to print the MAIN content of a page. There is no need for multiple templates! Why should? Nobody will print overview pages or such useless information. Only articles are interesting - Logo, link, headline, content section...
I will not support multiple print templates.
Oliver
I will not support multiple print templates.
Oliver
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
and remember: sections which should not be printed can be wrapped in
You can use NO_PRINT wrapper as often as you need/like.
Oliver
Code: Select all
<!--NO_PRINT_START//-->
<this will not be printed when selecting phpwcms "print">
<!--NO_PRINT_END//-->
Oliver
Coming a bit late in the subject but...
Here's what I only have in my print_layout.css file :
Ex. Ref.: logotypes.ca
@import url("frontend.css");
body {
font-family: "Lucida Grande", Verdana, Helvetica, sans-serif;
font-size: 11px;
color: #4D4D4D;
margin: 15px 40px 40px 40px;
background-color: #FFFFFF;
}
All I needed was the special control on margins when printed.
All other formating comes from frontend.css
Hope it helps
Yves
Here's what I only have in my print_layout.css file :
Ex. Ref.: logotypes.ca
@import url("frontend.css");
body {
font-family: "Lucida Grande", Verdana, Helvetica, sans-serif;
font-size: 11px;
color: #4D4D4D;
margin: 15px 40px 40px 40px;
background-color: #FFFFFF;
}
All I needed was the special control on margins when printed.
All other formating comes from frontend.css
Hope it helps
Yves
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Cheers Oliver - i do understand - actually makes sense
could I ask a related question - I raised this a while back - basically the ability to have separate pagelayout templates for article listing vs full article. I have a need for this for a research project - basically needing nearly full width of page for full article (no left or right column content) I was attracted to this as part of Wordpress.
I did discuss this in a raw fashion in this thread. I do have a hack working
http://www.phpwcms.de/forum/viewtopic.p ... ght=#69605
- wanted to ask if you see the logic in this - any plans to implement...this is a designers dream capability: please say yes(ja) - at some stage.
could I ask a related question - I raised this a while back - basically the ability to have separate pagelayout templates for article listing vs full article. I have a need for this for a research project - basically needing nearly full width of page for full article (no left or right column content) I was attracted to this as part of Wordpress.
I did discuss this in a raw fashion in this thread. I do have a hack working
http://www.phpwcms.de/forum/viewtopic.p ... ght=#69605
- wanted to ask if you see the logic in this - any plans to implement...this is a designers dream capability: please say yes(ja) - at some stage.
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
regarding you switching template - hm maybe I don't really understand. Sceenshots would help a bit better.
There is a special article listing template - can be used to place any additional stuff you like before or after listing - same for article.
template/inc_default/article_summary_list.tmpl
Oliver
There is a special article listing template - can be used to place any additional stuff you like before or after listing - same for article.
template/inc_default/article_summary_list.tmpl
Oliver
Hi Oliver -
do appreciate your time - with all the other stuff you do and have to manage-
Here are the two screenshots - top one is article list pagelayout template
and the bottom is full article pagelayout - the principle is to offer this choice of page layouts themselves.....
ARTICLE LIST PAGELAYOUT TEMPLATE
FULL ARTICLE PAGELAYOUT TEMPLATE
this is content.func.inc.php modification
(using custom blocks)
cheers
do appreciate your time - with all the other stuff you do and have to manage-
Here are the two screenshots - top one is article list pagelayout template
and the bottom is full article pagelayout - the principle is to offer this choice of page layouts themselves.....
ARTICLE LIST PAGELAYOUT TEMPLATE
FULL ARTICLE PAGELAYOUT TEMPLATE
this is content.func.inc.php modification
(using custom blocks)
Code: Select all
case 2: //create the page layout based only on the content of main block
//$content["all"] = $block["maintext"];//
// break;
// modification jsw_nz
$int_val_count = intval($GLOBALS['content']["article_list_count"]);
global $article_listmode;
if ($int_val_count > 1){
// show listing only
$article_listmode = 1;
$content["all"] .= $block['customblock_LIST_ARTICLE'];
}else{
// show full article
$article_listmode = 0;
$content["all"] .= $block['customblock_FULL_ARTICLE'];
}
$content["all"] .= $block["footertext"];
break;
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
thanks - I think I am missing something -
if <div class="calendar">...</div> exists in pagelayout template,
-- using frontend.css stylesheet .calendar {display:block; etc; etc;}
the pagelayout template is a common 'wrapper' to both article-list and full-article scenarios,
then in Full Article template
display:block could be overriden by using
imported (@import) css statement that declares:
.calendar {
display:none:
}
The same strategy would be applied to <div class="back">...</div>,
i suppose
Is this what you are referring to - ? - never tried that....
seems confusing to me - would prefer two separte textareas in template section - easier to keep track of....
if <div class="calendar">...</div> exists in pagelayout template,
-- using frontend.css stylesheet .calendar {display:block; etc; etc;}
the pagelayout template is a common 'wrapper' to both article-list and full-article scenarios,
then in Full Article template
display:block could be overriden by using
imported (@import) css statement that declares:
.calendar {
display:none:
}
The same strategy would be applied to <div class="back">...</div>,
i suppose
Is this what you are referring to - ? - never tried that....
seems confusing to me - would prefer two separte textareas in template section - easier to keep track of....
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
I have thought about listing and article detail view again. I will implement new section tags:
Oliver
Code: Select all
<!--IF_LIST_MODE_START//-->
--> will be shown when in article listing mode
--> everything wrapped in ELSE_LIST_MODE will be deleted
<!--IF_LIST_MODE_END//-->
Code: Select all
<!--ELSE_LIST_MODE_START//-->
--> will be shown when in article detail mode
--> everything wrapped in IF_LIST_MODE will be deleted
<!--ELSE_LIST_MODE_END//-->