If it’s just a few pages that will have the alternate CSS file, it will be faster to create a Template Variable to hold the path to the CSS file and give it a default value of the path to the standard CSS file and then change that TV on the page(s) where you want to have a different one:
<link rel="stylesheet" type="text/css" href="[*TvName*]" />
PHX is kind of slow when it comes to conditionals.
If it’s a bunch of pages, a snippet with a case statement for the various IDs that returned the path to the CSS file might be easier:
Snippet Call:
<link rel="stylesheet" type="text/css" href="[!GetCSSPath? &pageID=`[*id*]`!]" />
GetCSSPath Snippet:
<?php
switch($pageID) {
case '2':
case '7':
return('path to CSS file');
break;
case '9':
case '12':
return('path to another CSS file');
break;
default:
return ('path to default CSS file');
}
?>