Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
28 posts Page 3 of 3
orbital wrote: can something be done or is it impossible?

Change the order :)

Code: Select all
<cms:if this_is_main_index_page >
   <cms:minify 'css' >
<cms:else />
   <cms:minify 'css' >
The way the tag is written, it can't process any kind of Couch logic or Couch tags inside the tag. All it sees is plain text. You'll have to place any logic outside of the tag as in @trendoman's example.
Yes, I also assumed this
Code: Select all
<cms:minify 'css' into='css/style.min.css' media="only screen and (min-width: 800px)" >
        <cms:minify 'css' into='css/mStyle.min.css' media="only screen and (max-width: 799px)" >
        <cms:minify 'css' into='css/default.min.css' >

does not work with the >> media = "only screen and (min-width: 800px)
Please drop the attached file into your couch/addons/minify-js-css folder, overwriting the original. The tag will then pass any additional parameters after the output file name through to the <link>, <style>, or <script> tag.

:) Thanks for your input. Once I've had more time to test this mod, I'll update the original at the top of the thread.
Guys, this plug-in requires turned on allow_url_fopen on the server!!!
I have lost a lot of time to think about it - the symptoms of this problem are an empty output file.
I have updated this addon in response to questions and discussion in this thread. The new update allows the user to add attributes to the generated link, script, and style tags. I also corrected the code so that it now processes Couch tags and logic placed inside the tag. However, the end result must still resolve to a list of valid file paths separated by any kind of whitespace and/or commas.

I really appreciate all of the engagement and feedback that have helped to refine and improve the function of the cms:minify tag, and hope that it contributes to your positive experience with CouchCMS.
Tim this is great !!! I am very happy about these improvements - BRAVO ;)
Every site needs all this, thanks again.

There is only one step to the top - Minimize HTML code, what do you think about this:

28 posts Page 3 of 3

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests