Start ::
PostNuke 0.7 Support ::
XTE Support ::
Unable to set new template for block
Moderated by: Support Team
-
- rank:
-
Helper
- registered:
- January 2004
- Status:
- offline
- last visit:
- 15.04.06
- Posts:
- 195
Hi,
I have started using Xanthia to create a new theme based on the "PostNuke" theme packaged in the Xanthia Themes pack.
I have had a reasonable amount of success with creating module specific themes/zones.
I am unable to apply a new skin / theme to individual blocks.
I am attempting to create a template for a "Poster" block that will normally consist of an image and some paragraph text.
I have been unable to use the Visual Block Editor to set the template for a block to the template I specified (or one of the predefined ones). The
"Custom Module and Block Templates" tutorial suggests that there should also be a facility to change the template for a block on the "Block Control" page - I have only seen a facility for selecting a block zone.
Has anyone else had the same difficulty?
I also attempted to use the "SeaBreeze" theme as a starting point in the hope that I could set a block template in the theme. I had no success.
I have tried using "phpMyAdmin" to manually set the template in the "nuke_theme_bl" table. This didn't work.
I'd appreciate any help as Xanthia would otherwise save me a great deal of time.
Thanks. -
- rank:
-
Helper
- registered:
- January 2004
- Status:
- offline
- last visit:
- 15.04.06
- Posts:
- 195
I have had a further attempt to set template for a specific block instance using Xanthia. I was concerned that the apache (2.0) / PHP (4.2.2) configuration on my Linux test server was faulty and not dealing with pnRender/Xanthia pages properly so installed apache2triad on my Windows XP box. I cleanly installed PN .726 on this XP server with Xanthia / pnRender and was unable to set template for a specific block instance
Can anyone suggest what I am doing wrong?
My steps are for a block template file "posterblock.htm":
1. create template (with notepad) and save in THEMENAME/template/blocks/posterblock.htm
2. click green visual block editor activiation flag
3. select newly created template from drop-down and click adjacent submit button (and the page refreshes without using my block template)
I have also tried the Visual Block Editor's "Page Refresh" button (no success). A check of the block template content via Edit Theme -> Theme Templates -> [Edit] (for "posterblock.htm" template) confirms that the template is loaded into the database.
Having had little success with block-specific templates I have tried a work-around by creating my own plug-in to determine module loaded and hence the block style to use within my own lsblock.htm:
>
The effect that I want is for some blocks to display with $content, no $title and appropriate style.
Does anyone have any suggestions as to why the block-specific templates are not applied?
The "getblockelementattributesbymodule" plugin determines the module loaded and returns a string such as:
id="#mainposter" class="signblock"
I quite like the flexibility of creating plugins and can see that it will be quite useful ...
Can anyone suggest why the block-specific templates are not being applied. Is this an incomplete feature in Xanthia RC2?
Thanks,
Graeme -
- rank:
-
Developer
- registered:
- October 2002
- Status:
- offline
- last visit:
- 24.03.06
- Posts:
- 269
mrmuttley,
First you must activate a zone for this block.
Xanthia->Edit Theme->Theme Zones->Add New Zone
Choose a Zone Name (Use something like BLOCKNAME Template... This can have spaces and be named anything you like really.
Zone Label will be set automatically
New master for module (This is used for setting specific template for a module so do not use for a block)
New skin for block: Choose the block you want to template.
When you submit you will see that the zone is inactive and not template assigned.
Click Confiure: From dropdown list choose a block template
Page refreshes just activate the zone now.
I am working on making this a little more user friendly for next release. Plus adding more features.
Hope you enjoy
Larry E. Masters
Xanthia Theme Engine Developer -
- rank:
-
Helper
- registered:
- January 2004
- Status:
- offline
- last visit:
- 15.04.06
- Posts:
- 195
Larry,
That worked. I am now enjoying ... it will be better once I am a bit more familiar with it. Xanthia themes will save me a great deal of time.
I'm looking forward to .8.
Keep up the good work.
--
Graeme -
- rank:
-
Helper
- registered:
- January 2003
- Status:
- offline
- last visit:
- 29.03.08
- Posts:
- 137
this was very helpful... I have an idea of how it works. I got my Activemenu to work because of this post but I'm still not sure how it works if that makes sense lol
-----
Yo motha fucka! WEEEEEEEEEEEEEEEEE!
Start ::
PostNuke 0.7 Support ::
XTE Support ::
Unable to set new template for block
