I have created a Custom Extension with the CSS, where I would like to change the value of CSS from the Extension Properties.
The extension files are
1) forumlayout.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<ew-extension name="Layout" version="13.0.6" type="Forum Layout" author="PHPMaker Forum">
<description>
<![CDATA[This Extension is created by PHPMaker Forum for the Needs of Forum Users
Note: Layout Extension is not a part of PHPMaker. Please read "Third-Party Tools" in the help file.
]]>
</description>
<file>forumlayout.zip</file>
<Project>
<Attribute name="ContentLeft" type="Boolean" default="False"/>
<Attribute name="C_LeftWidth" type="Integer" default="0"/>
<Attribute name="ContentRight" type="Boolean" default="False"/>
<Attribute name="C_RightWidth" type="Integer" default="0"/>
</Project>
</ew-extension>
2) control.xml
<?xml version="1.0" standalone="yes"?>
<phpmaker.forumlayout date="2015/09/22" version="13.0.6" desc="forumlayout" author="PHPMaker Forum">
<control id="layoutcss" type="other" action="add"
ifiles="layoutcss.css"
ofolderid="_css"
ofile="layout" oext="css">
<session type="key" value="layout" />
</control>
</phpmaker.forumlayout>
3) layoutcss.css
<!--##session layoutcss##-->
.ewLeftContent {
background-color:inherit;
color: inherit;
<!--##
var EXT = ew_GetExtObj(sExtName);
if (EXT.Enabled && EXT.PROJ) {
var sContentLeftValue = ew_GetExtPrp(EXT.PROJ.Properties, "C_LeftWidth");
if (ew_IsNotEmpty(sContentLeftValue)){
iLeftWidth = sContentLeftValue;
}
}
##-->
width: <!--##=iLeftWidth##-->px;
<!--## } else { ##-->
width: 0px;
<!--## } ##-->
vertical-align: top;
padding: 0;
}
.ewRightContent {
background-color:inherit;
color: inherit;
<!--##
var EXT = ew_GetExtObj(sExtName);
if (EXT.Enabled && EXT.PROJ) {
var sContentRightValue = ew_GetExtPrp(EXT.PROJ.Properties, "C_RightWidth");
if (ew_IsNotEmpty(sContentRightValue)){
iRightWidth = sContentRightValue;
}
}
##-->
width: <!--##=iRightWidth##-->px;
<!--## } else { ##-->
width: 0px;
<!--## } ##-->
vertical-align: top;
padding: 0;
}
#ewLeftContent, #ewRightContent {
display: table-cell;
}
<!--##/session##-->
The css file is not copied to the PHPCSS with the require value.