Friday, October 23, 2009, 11:14:24 PM, Sandy wrote:
Thinking further, can this go in skin.php?
$color1 = '#00cc00';
That keeps all the skin stuff in the skin, and avoids $HTMLStylesFmt[].
why don't you just set the color attributes in
the skin's css file? after all, the purpose of the
css
Saturday, October 24, 2009, 3:54:43 AM, DaveG wrote:
Sandy wrote:
I'm not (yet) comfortable with $HTMLStylesFmt[].
It's an array, which can contain arrays :)
I thought not. I understand $HTMLStylesFmt to list
css attributes, which get injected into
styles.../styles tags in the page's HTML
Friday, October 23, 2009, 11:56:25 PM, DaveG wrote:
Parse error: syntax error, unexpected T_STRING in
/path/pmwiki.php(762) : eval()'d code on line 1
That's because the PageVar needed to be quoted, as Hans showed. Thus,
$FmtPV['$myvar'] = 'PageVar($pagename,\'$:myvar\')'
There were in
Hans wrote:
Friday, October 23, 2009, 11:56:25 PM, DaveG wrote:
Parse error: syntax error, unexpected T_STRING in
/path/pmwiki.php(762) : eval()'d code on line 1
That's because the PageVar needed to be quoted, as Hans showed. Thus,
$FmtPV['$myvar'] = 'PageVar($pagename,\'$:myvar\')'
DaveG wrote:
Sandy wrote:
I'm not (yet) comfortable with $HTMLStylesFmt[].
It's an array, which can contain arrays :) Usually you index the array
with the name of the skin, but any name (or even no name) will work
fine. The content of the array is output at the point in the .tmpl file
Saturday, October 24, 2009, 4:04:34 PM, DaveG wrote:
3. use of $pagename: use $pn rather than $pagename as $ pagename may
have a different value.
Not sure about this. Is $pn globally available? Not sure, but it doesn't
look like it. I'd always thought $pagename referred to the current page
Hans wrote:
Friday, October 23, 2009, 11:14:24 PM, Sandy wrote:
Thinking further, can this go in skin.php?
$color1 = '#00cc00';
That keeps all the skin stuff in the skin, and avoids $HTMLStylesFmt[].
why don't you just set the color attributes in
the skin's css file? after all, the
Sandy wrote:
Well in order to use the variable from within the template you'd need
use $FmtPV:
$FmtPV['$color1']='#00cc00';
So then you could use it in .tmpl (not in .css files though). Personally
I prefer to use $HTMLStylesFmt.
What's up with the two quotation marks? I remember
DaveG wrote:
Sandy wrote:
Well in order to use the variable from within the template you'd need
use $FmtPV:
$FmtPV['$color1']='#00cc00';
So then you could use it in .tmpl (not in .css files though). Personally
I prefer to use $HTMLStylesFmt.
What's up with the two quotation marks?
Aha! Googling the right terms helps. A way to use php to create a css file.
http://www.barelyfitz.com/projects/csscolor/
Probably old news to many, but new and intriguing to me. Just checked
the PmWiki docs, and yes I can have more than one php file in the skin
folder. Something for me to play
Sandy wrote:
Aha! Googling the right terms helps. A way to use php to create a css file.
http://www.barelyfitz.com/projects/csscolor/
You could do this, but I can't help thinking you're way over
complicating things...
___
pmwiki-users mailing
Dear pmwiki-users,
I have a lot of fun discovering pmwiki and I already like it very
much.
One thing I can't figure out, even after reading many pages on
pmwiki.org:
I would like to use a variable in my skin template. Ideally, this
would be similar to the
(:title Title of Page:)
markup, but
Sven Hartenstein wrote:
Dear pmwiki-users,
I have a lot of fun discovering pmwiki and I already like it very
much.
One thing I can't figure out, even after reading many pages on
pmwiki.org:
I would like to use a variable in my skin template. Ideally, this
would be similar to the
Hi Dave,
thank you for your answer!
I would like to use a variable in my skin template. Ideally, this
would be similar to the
(:title Title of Page:)
markup, but I'd be ok with using a PageTextVariable. So, is it
possible to use such a variable in the skin template? {*$:MyVariable}
DaveG wrote:
To use a PHP variable within a skin template you need to store it as a
FmtPV variable, which needs to be a executable PHP statement (thus the
odd quotes). Refer to PmWiki/PageVariables:
$FmtPV['$MyVar'] = 'abc';
And then to use it in the .tmpl file:
My quote of the day
Friday, October 23, 2009, 8:14:27 PM, Sven Hartenstein wrote:
But this would mean the variable has just one value. I would like the
wiki editors to be able to set the variable differently for each page,
when editing the page.
Then maybe it is easiest to use div markup for those quotes, with
Hi Hans,
Then maybe it is easiest to use div markup for those quotes, with a
specific class name, and use css to set the div where you want it.
But you would need to absolutely position it.
That's what I currently do. I am not very happy with it. I would
prefer to set the text in the same
Sandy wrote:
in config.php
$FmtPV['$color1'] = '#00cc00';
then in the .tmpl file:
style
h1 {color:$color1;}
A {color:$color1;}
Rather than this use:
$color1 = '#00cc00';
$HTMLStylesFmt['my_skin'] = h1 {color:$color1;} ;
That way, there's no need to mess with .tmpl.
~ ~ Dave
Sven Hartenstein wrote:
Hi Hans,
Then maybe it is easiest to use div markup for those quotes, with a
specific class name, and use css to set the div where you want it.
But you would need to absolutely position it.
That's what I currently do. I am not very happy with it. I would
prefer
Sven Hartenstein wrote:
Hi Hans,
Then maybe it is easiest to use div markup for those quotes, with a
specific class name, and use css to set the div where you want it.
But you would need to absolutely position it.
That's what I currently do. I am not very happy with it. I would
prefer
Friday, October 23, 2009, 10:12:41 PM, Sven Hartenstein wrote:
Any chance of using a PageTextVariable in the skin template?
try this:
add to config.php:
$FmtPV['$HeaderQuote'] = 'PageTextVar($pn, HeaderQuote)';
then put the page variable {$HeaderQuote} in your skin template
somewhere.
and
DaveG wrote:
Sandy wrote:
in config.php
$FmtPV['$color1'] = '#00cc00';
then in the .tmpl file:
style
h1 {color:$color1;}
A {color:$color1;}
Rather than this use:
$color1 = '#00cc00';
$HTMLStylesFmt['my_skin'] = h1 {color:$color1;} ;
That way, there's no need to mess with
Friday, October 23, 2009, 10:12:41 PM, Sven Hartenstein wrote:
Any chance of using a PageTextVariable in the skin template?
you can do it even without setting a PV.
just addd to your skin template somewhere:
!--markup:{$:HeaderQuote}--
~Hans
more info about skins and skin templates:
http://www.pmwiki.org/wiki/Cookbook/SkinGuidelines
~Hans
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Hi David,
Or, you could grab the PTV into a variable, and then use it from the tmpl:
$FmtPV['$myvar'] = PageVar($pagename,'$:myvar')
This gives me:
Parse error: syntax error, unexpected T_STRING in
/path/pmwiki.php(762) : eval()'d code on line 1
Do not know what's wrong. Anyway, the
This works perfectly! Thank you a lot! :-)
Sven
* Hans desi...@softflow.co.uk:
Friday, October 23, 2009, 10:12:41 PM, Sven Hartenstein wrote:
Any chance of using a PageTextVariable in the skin template?
try this:
add to config.php:
$FmtPV['$HeaderQuote'] = 'PageTextVar($pn,
And this works perfectly, too. :-)
Thank you!
Sven
* Hans desi...@softflow.co.uk:
Friday, October 23, 2009, 10:12:41 PM, Sven Hartenstein wrote:
Any chance of using a PageTextVariable in the skin template?
you can do it even without setting a PV.
just addd to your skin template
Sven Hartenstein wrote:
Hi David,
Or, you could grab the PTV into a variable, and then use it from the tmpl:
$FmtPV['$myvar'] = PageVar($pagename,'$:myvar')
This gives me:
Parse error: syntax error, unexpected T_STRING in
/path/pmwiki.php(762) : eval()'d code on line 1
That's
Sandy wrote:
I'm not (yet) comfortable with $HTMLStylesFmt[].
It's an array, which can contain arrays :) Usually you index the array
with the name of the skin, but any name (or even no name) will work
fine. The content of the array is output at the point in the .tmpl file
where the
29 matches
Mail list logo