salient — 2014-03-06T21:18:11-05:00 — #1
Am having a major head explosion with this one.
<link href="<?php echo($globalvar['default_style']) ?>.css/main.css" rel="stylesheet" type="text/css">
the href should be showing something like "./themes/standard/css/main.css" which it appears to do when I interrogate the php variable, however the css is not being applied ... not sure what I am missing and quite possibly need a debug tool of some kind.
Can you have dynamic links to style sheets in the head section of an html page?
cheesedude — 2014-03-07T00:20:14-05:00 — #2
Let me grab my umbrella. :lol:
Yes. I don't know why you have parenthesis around your variable you are echoing out as echo is not a function, but a language construct. And PHP statements should end with a semi-colon and you have another syntax error.
<link href="<?php echo $globalvar['default_style'] . 'css/main.css';?>" rel="stylesheet" type="text/css">
<link href="<?php echo $globalvar['default_style'];?>css/main.css" rel="stylesheet" type="text/css">
Give that a try or something similar. I did not test. Look at the output. Ensure you have a proper slash before css/main.css. All you have is a simple syntax error. Should be easy for you to solve.
john_betong — 2014-03-07T01:22:50-05:00 — #3
Try a fixed path instead of a relative path, the latter has always caused me problems.
$globalvar['default_style'] = 'http://yoursite.com/themes/standard/css/main.css';
<link href="<?php echo $style;?>.css/main.css" rel="stylesheet" type="text/css">
salient — 2014-03-07T18:08:40-05:00 — #4
D'uh, thanks for pointing out the error ... am currently banging my head against my desk!