Start ::
Zikula 1.0 Support ::
Themes and Templating ::
is it possible to load a block from the template folder
Moderated by: Support Team
-
- rank:
-
Helper
- registered:
- May 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 127
hello
i would like to know if it's possible to load a block from the theme folder ?
i ve look at pnBlock.php and have seen this
the theme folder doesn't seems to be parsed (perhaps it's done in an other process), so i would like to know if it possible to load a block from a theme folder
edited by: mumuri, Apr 27, 2008 - 12:42 PM
-----
4 pages of french & english Zik.1 tips -
- rank:
-
Professional
- registered:
- September 2006
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 1189
I guess not,
/config/blocks is the general place of the customized blocks
and if you'll extract data from any module, you can also make a plugin in your theme...
or you wanna to manage it with block positions?
then put it in the /config/blocks folder
-----
- Mateo T. -
Mis principios... son mis fines -
- rank:
-
Steering Committee
- registered:
- December 2002
- Status:
- offline
- last visit:
- 01.09.08
- Posts:
- 13408
Blocks are a code thing, generally associated with modules rather than themes - if you need a theme 'block', either hard code it or use a Smarty plugin (or insert if you don't want it cached). These are both more efficient than the standard block code anyway.
-----
Regards,
Simon
itbegins.co.uk - Zikula Consulting
Please read the Support Guide -
- rank:
-
Professional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 04.09.08
- Posts:
- 2918
Not sure what your intent is...
But you can create a dummy block (avec/sans title and content) in the block admin
You can create the block in your theme folder as you would any custom block template.. and fill it with whatever you want...
It is not elegant but it works..
As long as block 'exists' you can render whatever you want inside it.. you don't have to use the recommend < - content - >
-----
David Pahl
Zikula Support Team
-
- rank:
-
Helper
- registered:
- May 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 127
the problem is that you can't configure anything in Smarty, all constants are hard coded ( anyway that's what i ve done for the moment)
my goal is to create a custom portal where all specific content are located in the theme path with custom plugins and templates (and eventually blocks) by using the template overriding properties, the goal ... easier maintenance.
-----
4 pages of french & english Zik.1 tips -
- rank:
-
Professional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 04.09.08
- Posts:
- 2918
Which content?
You can really abuse the theme system to make it do anything really. It is wonderfully powerful. Set up a few theme level variables and you can automate it to do a lot.
Can you give a more specific example?
Au revoir!
-----
David Pahl
Zikula Support Team
-
- rank:
-
Helper
- registered:
- May 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 127
hello
Which content? plugins, templates and blocks (and their template)
for instance, you ve made your own "online user" block with options that you can configure in the admin part, or you have created a block to sort news in specific ways, or you have created a block to show top member in a community
bye
edited by: mumuri, May 01, 2008 - 03:50 PM
-----
4 pages of french & english Zik.1 tips -
- rank:
-
Professional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 04.09.08
- Posts:
- 2918
I would think that it can work, as long as you make the correct API call (if needed) you can output whatever you want, in any format you want. Xanthia is setup for pretty much full configuration, so I don't see a problem. You could even put theme checks into templates and leave them in the config file to take a more global approach.
The flexibility is there, go crazy.
I would love to see what you are working on, if you are willing to share.
Later!
-----
David Pahl
Zikula Support Team
-
- rank:
-
Professional
- registered:
- September 2006
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 1189
I guess that some little details and data can be extracted with plugins,
some other configurable sections, can be customized blocks in the /config/blocks dir
or in the Mumuri module
If there are a lot of details to control,
theme variables list can be too large, so,
it depends on how you order your customizations.
As example, in BlankTheme we use three variables to control the layout, the template ("grid") to use, and the flag to use a plugin-based navigation or a block based one...
Too complex customizations
may requires customized blocks in the Mumuri module!
-----
- Mateo T. -
Mis principios... son mis fines -
- rank:
-
Helper
- registered:
- May 2004
- Status:
- offline
- last visit:
- 05.09.08
- Posts:
- 127
my project is a full custom template for my discussions board, for the moment i ve nothing online, but a first beta version should come soon (there is no specific module in it) (module : pnmessage, pnForum, avatar, ezcomment, autobugs ...)
bye
Start ::
Zikula 1.0 Support ::
Themes and Templating ::
is it possible to load a block from the template folder
