You are not logged in.
BTW – does not work in error_default pages. I had this which did not work:
<!-- CSS -->
<txp:rvm_css format="link" n="default" />
<txp:rvm_css format="link" n="menu" />
Changed it back to:
<!-- CSS -->
<link rel="stylesheet" href="<txp:css n="default"/>" type="text/css" />
<txp:css format="link" n="menu" />
Works again.
TXP Tips | @txptips | Me | @jonathanstubbs | Github
TXP Builders – finely-crafted code, design and txp @txpbuilders
Online
I actually use two forms – “header” and “header_error” – first one for normal pages and the second one goes in error_default page.
In the header form:
<!-- CSS -->
<txp:rvm_css format="link" n="default" />
<txp:rvm_css format="link" n="menu" />
Produces:
<!-- CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="http://www.mysite.com/css/default.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://www.mysite.com/css/menu.css" />
With the same rvm_css tags in the header_error form, I get this:
<!-- CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="http://www.mysite.com/css/default.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://www.mysite.com/css/default.css" />
Its picking up the default.css but not the menu.css.
TXP Tips | @txptips | Me | @jonathanstubbs | Github
TXP Builders – finely-crafted code, design and txp @txpbuilders
Online
Neil and Jonathan, try version 0.3 of the plugin (see first post). That should fix both problems.
As for stm_javascript… it’s probably best to ask that plugin author to add this functionality, which would be more efficient (in code size) than creating an companion plugin for stm_javascript.
Offline
Just one word : fabulousssssssssssssssssssssss!
;p
Have a very good new year Ruud.
:)
Patrick.
Txp Tricks & Tips by french users : http://txp-fr.net | G+
@Devs : Can’t find the punched tape version of TXP and I need it!
Happy user of TXP 1.0RC1
Offline
Fixed. Thanks Ruud.
TXP Tips | @txptips | Me | @jonathanstubbs | Github
TXP Builders – finely-crafted code, design and txp @txpbuilders
Online
Would this be worthwhile if using a php styleswitcher? I have this code in the head of the page. I can change txp:css but how would I alter the other code and would it be any good anyway?
<style type="text/css" media="screen,projection">
@import "<txp:site_url />textpattern/css.php?n=default";
</style>
<txp:php>
global $prefs;
$cookie_s1 = cs('s1');
$cookie_s2 = cs('s2')
;
if ($cookie_s2) {
echo n.'<link rel="stylesheet" type="text/css" media="screen,projection" href="'.hu.'textpattern/css.php?n='.$cookie_s2.'" />';
}
if ($cookie_s1) {
echo n.'<link rel="stylesheet" type="text/css" media="screen,projection" href="'.hu.'textpattern/css.php?n='.$cookie_s1.'" title="'.$cookie_s1.'" />';
}
</txp:php>
<txp:css format="link" rel="alternate stylesheet" media="screen,projection" n="c" title="cool" />
<txp:css format="link" rel="alternate stylesheet" media="screen,projection" n="w" title="warm" />
etcetera
TXPQ Examples and discussion of Textpattern CMS quality.
Offline
peter, you’re loading 3 – 5 style sheets so rvm_css would give a huge speed increase (saves 3 – 5 times the overhead of starting PHP and TXP to get a style sheet). The fact that your template contains a PHP style switcher doesn’t matter. It’s not the switching part that benefits, but the speed of loading the individual stylesheets:
@import "<txp:rvm_css n="default" />";
and replace <txp:css with <txp:rvm_css in all other places (see plugin help for other steps required after installation).
Offline
Ruud
thank you for yet another useful plugin.
Quick question: should plugins or mods assume the directory separator character is ‘/’ or should they use the DS definition of a directory separator as defined in constants.php? AFAIK, Windows uses ‘\’ as its path separator.
I’d like to know because I do use the ‘DS’ definition for directory separators in some of my own plugins and just wondered what the developers take on it is.
In fact, is the ‘DS’ is even needed at all (ie can Windows survive a ‘/’ separated file path without choking.)?
Many thanks in advance,
— Steve
Textile | My plugins on GitHub | @netcarver
Offline