Part 1 -- Interspire Website Publisher NX 1.7.* only
Open: /includes/classes/class.panel.php
Find:
$parsedPanelData = "";
Then paste this code after it:
if(strpos($this->_htmlFile,"ViewArticlePanel.html") !== false){
$origFile = $this->_htmlFile;
$categoryId = $GLOBALS["AL_CLASS_ARTICLE"]->_catlist[0];
$categoryName = $GLOBALS["AL_CLASS_ARTICLE"]->_catnames[$categoryId];
$categoryName = str_replace(" ","_",$categoryName);
$newFile = str_replace(".html","_" . $categoryName.".html",$this->_htmlFile);
if(file_exists($newFile)){
$this->_htmlFile = $newFile;
}
}Part 2 - Interspire Website Publisher NX 1.7.* and NX 2.0
Currently, all articles will use this file to display:
/templates/{your-template}/Panels/ViewArticlePanel.htmlWith the above code, this is now only the default. You can now create:
/templates/{your-template}/Panels/ViewArticlePanel_Arts.htmlA template file that all the articles that have 'Arts' as their category will use. The format is:
/templates/{your-template}/Panels/ViewArticlePanel.htmlCategoryName also has no spaces. If your category name does have a space, it will converted to an underscore. So say you have "My Example" as the category name. You can create:
/templates/{your-template}/Panels/ViewArticlePanel_My_Example.htmlAnd put content or ads specific to that category in there.
If you have any troubles with this guide, please submit a support ticket via the control panel.
