Hi,
When creating new blocks, should they be templated with pnRender? I scanned through some of the modules/blocks in Postnuke 0.76 and they all look like they are using pnHTML.
If anyone has a block done via pnRender, I'd like to take a look at it and see how it's done.
Thanks,
Grant
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. 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
pnRender and Blocks
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 240
Sweet, I just checked it out and will start working with it soon.
I am writing a module and will have a block associated with the module to be included on the front page. For my module, I'm using a custom pnstyle/style.css sheet. If I write my block with the custom CSS tags, will they be pulled in for the block when viewed on the front page?
Thanks,
Grant -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
No - loading a block will not (currently) trigger the linking of the module stylesheet. This is only available for the full module. However you can force a module stylesheet to be linked explicitly via a template tag. The following tag will link style.css from the module 'mymod'. Add this to the page templates of the theme (or the header_footer module page template for non Xanthia themes).
Code
<!--[modulestylesheet modname=<mymod>]-->
You can also define the filename of the stylesheet to use a different stylesheet.
Code
<!--[modulestylesheet modname=<mymod> stylesheet=aardvark.css]-->
Lastly the module can define the default stylesheet to be loaded (instead of style.css) by defining the 'modulestylesheet' module var (i.e. pnModSetVar('mymod', 'modulestylesheet', 'wibble.css'); )
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Just to add a little note about styles for blocks. The problem with imlementing a similar setup to the module stylesheets is one of performance. If we take a site with 10 blocks from 5 different modules then we have to check a fair number of paths to find if a stylesheet exists for each block. Additionally we'd probably have to query the database to find what blocks (and thier associated module) are active.
I'm not ruling this out but there a number of issues that would need to be looked at carefully prior to any implementation. Could you log this as a feature request at noc.postnuke.com.
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Look at the development resources block on each page here at postnuke.com.
-Mark
--
Visit My homepage and Zikula themes.
- Moderated by:
- Support
