- Moderated by:
- Support Team
-
- rank:
-
Softmore
- registered:
- July 2003
- Status:
- offline
- last visit:
- 31.03.08
- Posts:
- 89
After struggling with block control in a tableless Xanthia theme for the past few days, I finally got it to work. I wrote the following notes to help me remember how to do it again in the future and post them here in case they might help others, too.
Here is a step-by-step guide to adding a row of 3 blocks in the center of a Xanthia home page in PostNuke 0.762:
1. NEW BLOCKS:
a. Start by adding new blocks in Administration > Blocks
b. In my case I added Center Left, Center Middle, and Center Right blocks, each in the Center position
c. Note: Be sure to add a title for each block, so that it will show up in the Xanthia content wrapper and block control listings
2. BLOCK POSITION TAGS:
a. Go to Administration > Xanthia > MyTheme > Edit theme > Block Position Tags
b. Add new block position tags for each of the new blocks
c. My unique tags (in the center of the HTML comment code structure) are $CTRLEFT, $CTRMID, and $CTRRT
3. TEMPLATES
a. If you need a new template for the new blocks, then skip the Content Wrappers tab for a moment and . . .
b. Go to Administration > Xanthia > MyTheme > Edit theme > Templates
c. Add a new Block template, such as center.htm
4. CONTENT WRAPPER
a. Go to Administration > Xanthia > MyTheme > Edit theme > Content Wrappers
b. Add new content wrappers for each of the new blocks
c. My new wrappers are Center Left, Center Middle, and Center Right
d. For each one:
d1) Select the proper block under "New skin for block" and commit
d2) Select the template you wish to use for it, such as center.htm, and
d3) Activate the wrapper
5. BLOCK CONTROL
a. Go to Administration > Xanthia > MyTheme > Edit theme > Block control
b. This section might make more sense if you could setup block control by template -- but that is not a choice here -- so select the module that applies to you.
c. In my case, the News module controls my home page, so I select News from the Module drop-down list
d. In the Block selection area, highlight "Block Control" AND each of the blocks which you wish to control for the module in question:
d1) For me, that's Center Left, Center Middle, and Center Right for the new blocks, along with
d2) Main Menu, Login, and any other blocks that I want to show up on that page
d3) Note: Xanthia block control will override the regular PostNuke blocks admin for the module I've selected, so any block I want to show on the home page MUST be selected here
e. Click Update and a listing of relevant blocks will appear under the News module line in the module table at the bottom of the page
f. Original blocks will show their current Left or Right postions, with a "Default template" -- leave as is, if appropriate
g. For new blocks created in step 1, assign them to the positons created in step 2 and the template(s) created in step 3
6. HOME.HTM
a. My theme has a home.htm template for the home page, so that must now be edited to add the new blocks.
b. For a traditional theme, place the tags created in step 2 in a table in the center of the home page and then adjust for width and other characteristics, as needed
c. For a tableless theme, place the tags created in step 2 in a content div at the appropriate spot, inside the content wrappers created in step 4
7. CSS STYLING
a. Edit the related CSS files to style each of the new divs, as needed
b. Note: If one or more blocks are to be floated, then place them in home.htm ABOVE the non-floated block(s) in the content div -- otherwise, some browsers may not render properly
8. FLOAT DROP
a. After adding the new blocks in the center of the home page, your old right column blocks may suddenly drop down below the center ones (instead of next to them) in IE 6 -- this is a Microsoft bug leading to what is known as "float drop"
b. In my case, I added "overflow: hidden;" to the styling for #rightColumn and it made IE 6 play nice
c. Other solutions to cure float drop are available at http://nemesis1.f2o.org/aarchive?id=11
9. REWARD
a. You have now spent an unfortunate amount of time slogging through this process, but you are rewarded by a "non-Nukish" home page which you can modify to your heart's content
b. In my case, I also went and drank a beer. Cheers!
--
Terry Cochran
Boomernet - WashtenawWeb -
- rank:
-
Freshman
- registered:
- May 2006
- Status:
- offline
- last visit:
- 25.01.07
- Posts:
- 28
I'm having some issues with this. I added the new block position tags, but I don't know what to do with the template creation stage. Should I create a "center.htm"? If so, what do I put in it? -
- rank:
-
Helper
- registered:
- February 2005
- Status:
- offline
- last visit:
- 06.05.08
- Posts:
- 492
Well, if you would like to use already existing content wrapper files for your blocks, you don't have to create a new one. You could just set to use lsblocks.htm or rsblocks.htm (or whatever is present in your theme).
If the already present files are not sufficient, then you would have to create a new one. Take lsblocks.htm or rsblocks.htm as an example (copy the content) and save it under a new name (center.htm for exmple). Edit them to suit your needs.
--
-- Teb
-- Dutch PostNuke Community
Support questions in a Personal Message will be ignored. Use the forums at all times! -
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 23.08.08
- Posts:
- 448
Thank you very much for the step by step instructions. I'm trying this out and got stuck on the last step.
Quote
6c. For a tableless theme, place the tags created in step 2 in a content div at the appropriate spot, inside the content wrappers created in step 4
I'm confused by the exact difference between the block tags and content wrappers.
Here is what I attempted but it didn't work.
Code
< iv id="wrap">
<div id="leftcol">
<!--[$leftblocks]-->
</div>
<div id="rightcol">
<!--[$rightblocks]-->
</div>
<div id="content">
<!--[$_CTRLEFT]-->
<!--[$_CTRMID]-->
<!--[$_CTRRT]-->
<!--[$centerblocks]-->
<!--[$maincontent]-->
< /div>
< div class="clearingdiv"></div>
< /div>
This is from the xBlue theme from http://www.dynawerx.com/
PS. Whats the best way to display code in this forum ?
edited by: pnDev, Mar 20, 2007 - 03:01 AM
--
pnDev.com ~ featuring the PostNuke paid services forum -
- rank:
-
Softmore
- registered:
- July 2003
- Status:
- offline
- last visit:
- 31.03.08
- Posts:
- 89
xBlue is a fine theme -- that's the one I was using, when I wrote the step-by-step instructions.
Anyhow, the key here is that the code needs to flow from content wrapper to content div to content (and then close the div and wrapper). For example, here's a segment from my home.htm template on that site:
Code
<div id="topleft">
<div id="topl_content">
<!--[$TOPLEFT]-->
</div>
</div>
BTW, to display the code in the forum, just use the code and /code tags, inside square brackets.
--
Terry Cochran
Boomernet - WashtenawWeb -
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 23.08.08
- Posts:
- 448
Terry, thanks again for the help. I've repeated my steps and found out where I went wrong and now have it working as a prototype. I had completely missed this step.
Quote
5g. For new blocks created in step 1, assign them to the positons created in step 2 and the template(s) created in step 3
Also in step.Quote
5.d3) Note: Xanthia block control will override the regular PostNuke blocks admin for the module I've selected, so any block I want to show on the home page MUST be selected here
I had not selected almost all my blocks so that explained why my some of them had disappeared. I thought I must have messed up the template somehow and re-installed it several times.
So I am only left with one major question. Its in the wrappers the options for
New master for module: I set it to home but really had no idea. Also your suggestion where the block control could be set by module would be nice to. Thanks again for the help.
--
pnDev.com ~ featuring the PostNuke paid services forum -
- rank:
-
Softmore
- registered:
- July 2003
- Status:
- offline
- last visit:
- 31.03.08
- Posts:
- 89
Yes, the home.htm template (or something similar) will be the one most likely used for multiple block theming -- although, in theory, you could use the same techniques to style the output of any module.
--
Terry Cochran
Boomernet - WashtenawWeb -
- rank:
-
Software Foundation
- registered:
- December 1969
- Status:
- offline
- last visit:
- 07.11.08
- Posts:
- 968
You can always post this to the documentation Wiki so it doesn't get lost and it is easy to find in the future.
--
iThinkMedia.com
Follow me on Twitter -
- rank:
-
Softmore
- registered:
- July 2003
- Status:
- offline
- last visit:
- 31.03.08
- Posts:
- 89
Hi Vanessa, yes, the documentation Wiki would be a good idea, but how do I do that?
When I look at the UserDocs section, it looks like this topic would fit well under "Xanthia and Themes", but I see no way to add a new topic there.
What am I overlooking?
--
Terry Cochran
Boomernet - WashtenawWeb -
-
- rank:
-
Softmore
- registered:
- July 2003
- Status:
- offline
- last visit:
- 31.03.08
- Posts:
- 89

