print stylesheets - how to print all pages of paginated content? - css

I'd like to use CSS to specify a stylesheet for printing (instead of the "print friendly view"). The problem is that my web site has long article content that is paginated. When printing a paginated article using CSS, only the current single page gets printed instead of the whole article.
Is there any way to control the printing so that when the user prints the "all pages" view is printed instead of just a single page?

Sometimes you need to create custom output, just for printing. Same stylesheet, just with all the content on one go instead of paginated.
I sometimes put a parameter "printmode=1" or something, then load the content into a hidden iframe on the same page and print it from in there.

Related

How to add HTML text to every page using Google Optimize?

I would like to add a few lines of HTML to every single product page on my website.
However, it only works on one URL. I'm really sure my URL targetting is setup correctly.
I've selected an element on the page – and used "HTML" and "Insert" to add the code to the page. However it doesn't work on every page.

After submitting course create form in moodle 2.8 showing alert "This page should automatically.." message

I am using moodle 2.8
I have added some css code in course/edit.php to hide some form fields on for trainer/student role.
But when I submit form from trainer account showing alert message like
"This page should automatically redirect. If nothing is happening please use the continue link below."
and show "Continue" link.
I guessed, reason may be adding css in php script. but just I want to hide that message so my form should be submitted directly like admin area.
In almost every case, this error is because there is some extra output on the page that should not be there.
Usually it is caused by extra spaces before the opening '< ?php' tag in a file or incorrectly including a closing '?>' tag at the end of the file, followed by whitespace.
In this case, it may well be related to adding output to the wrong part of the page, by adding CSS to edit.php. If you want extra CSS on the page you should add it to the theme, or you may be able to add it via the theme settings. Note that every page has unique classes added to the 'body' tag, so you can use that to write CSS that only applies to a single page in Moodle.

How do I render HTML elements on the index page of a ghost blog?

Is there a way to make the post preview on the index page render like the permalink page?
Just to be clear the index page excerpts the first few lines in plain text. The permalink page displays the content withing HTML elements.
I understand that this is probably by design, but it occasionally makes a post preview illegible.
What the Excerpt!?
With Ghost an excerpt is a small preview of a posts content, usually included on the index page. The excerpt is stripped of any HTML elements and rendered as a string:
{{excerpt words="50"}}
Show the Content
It is possible the content, with HTML elements included, on the index page. Replace the code above with the following:
{{content words="50"}}
Use with caution!
As words="50" of content includes HTML elements and words, you may end up with unclosed HTML elements.

Keep formatting when posting content from a textarea to wordpress

I'm using USP-Pro to let users post to a Wordpress blog. I have a textarea input in which they should put the main post content - the one that appears in the Wordpress admin editor. I'd like to keep the text formatting once they submit the form so I'm using CKEditor for that textarea.
CKEDITOR.replace('usp-content');
Checking the textarea with Firebug while I input the text shows that there actually is some HTML code inside, but when the form is submitted, in the editor I just see the raw text, without any formatting, which is pretty annoying because I lose all the spaces, the new lines and so on.
EDIT:
After various attempts I discovered that the problem is in the Wordpress function wp_strip_all_tags, inside the file wp-includes/formatting.php. I tried to comment it and it actually posted the content correctly with all the html in place.
Of course I can't just comment the whole function. How can I tell Wordpress to not use it when submitting such posts?

RSS <link> tag not appearing in <head> of Drupal view page display output

I have a Drupal 6 site with a view that has a page and a feed display. Both the page and the feed work great. The view just shows content type Story in reverse chronological order- basic blog listing page.
While the RSS look good, the page display doesn't include the tag in the header for auto-discovery. I've outputting $head in my page.tpl.php, so it should be there. Also, I noticed the $feed_icons variable is empty.
Any ideas?
In Drupal 6 this is no longer automatic.
Edit the view and under "Feed Settings" set "Attach to" to the page that you want to autodiscover the feed.
This should happen automatically in most cases. If you are doing something a little strange you may need to use drupal_add_feed() to add the feed to the page

Resources