Hi All,
1st: Having put out a couple of standard postnuke themed sites up for charities, I got to say this CMS rocks! And thanks to the community for all the advice. I would have asked more stoopid questions but most of the answers are already here :D
Now I want to start designing custom themes for personal use and public share so here's the question:
Is it possible with the standard themes (or any 3rd pty themes) to alternate the colours/backgrounds used as the headers to the items within blocks (e.g. the news articles so that each heading has a different or alternating background colour or image)?
An example: http://www.ipsem.com…/clients/nhsc/1.gif
Thanks for all the support.
Pete
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- craigh responded to »Using PageUtil::addVar() to load script code« 03:29 PM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Alternate header colours/background images for news articles
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 451
appy
Hi All,
1st: Having put out a couple of standard postnuke themed sites up for charities, I got to say this CMS rocks! And thanks to the community for all the advice. I would have asked more stoopid questions but most of the answers are already here :D
Now I want to start designing custom themes for personal use and public share so here's the question:
Is it possible with the standard themes (or any 3rd pty themes) to alternate the colours/backgrounds used as the headers to the items within blocks (e.g. the news articles so that each heading has a different or alternating background colour or image)?
An example: http://www.ipsem.com…/clients/nhsc/1.gif
Thanks for all the support.
Pete
Yes it is if you use the Xanthia Theme Engine
One of the limitations with PostNuke themes is you are limited to block styles and arrangements. With Xanthia you can assign a HTML template called a tpl file for each block you create. The Xanthia Theme Engine separates HTML from PHP so all you need to do is edit HTML template files to alter your page and block styles.
You can change background colors by either choosing to use a java color picker in the Xanthia User Interface in the Administration Menu or you can hardcode color values in the block template styles and create new ones. I found the latter necessary when using many different color title headers for multiple blocks.
There are 2 Xanthia tutorials available that explain how to edit block layouts and template styles here:
Xanthia is in its early development stages. Soon you will be able to edit your template files through the browser rather than FTP. Other features such as new theme creation and assigning block template styles to blocks will also be made easier.
Feel free to post any questions you may have at the Xanthia Forum at http://pnapi.com -
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
Hi - this has likely long been resolved, but it's worth noting that you can easily acheive the alternating news block effect with "classic" PN themes...
Just inside the themeindex() function (that displays the intro news blocks on the home page and topics) put:
Code
$GLOBALS['story_num']++;
if ($GLOBALS['story_num']%2 == 1) {
?>
HTML for "ODD" NUMBERED BLOCKS GO HERE
<?
} else {
?>
HTML for "EVEN" NUMBERED BLOCKS GO HERE
<?
}
Note the
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
