5094 Posts in 1517 Topics by 1114 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 465 Views |
-
Assign unique custom icons to individual pages of the same page type

2 June 2011 at 7:29pm
Using the following code in "mysite/_config.php"
ErrorPage::$icon = array('themes/rohitbanerjee-blocko/images/icons/error',"file");
I was successful in overriding the default icon for any page type, where I didn't want to change any original code, but simply customize it in my way, in my code base.However, I was wondering if I could similarly assign unique icons to unique pages with the same PageType/Class, rather than unnecessarily creating separate PageType/Class just for the icons.
Lets say I have 2 pages "About Us" and "Services" with the same PageType "Page", then can I assign an icon in the following similar fashion for the 2 pages as below:
Page::->$SomeFunctionToIdentifyPageObject("About Us")->$icon = array('themes/rohitbanerjee-blocko/images/icons/about',"file");
Page::->$SomeFunctionToIdentifyPageObject("Services")->$icon = array('themes/rohitbanerjee-blocko/images/icons/services',"file");provided I have the relevant icon image files in place.
Any help is immensely appreciated.
-
Re: Assign unique custom icons to individual pages of the same page type

11 June 2011 at 4:05am
I'm sure this was not a stupid question. But nobody attempted to answer at all??
| 465 Views | ||
|
Page:
1
|
Go to Top |

