Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- 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
News calendar
-
- Rank: Developer
- Registered: Feb 17, 2005
- Last visit: May 21, 2010
- Posts: 684
Is there a calendar module that can display a (category based) subsection of News? Alternatively: are there any 'calendar templates' available for news? -
- Rank: Team Member
- Registered: Jan 19, 2003
- Last visit: Apr 06, 2010
- Posts: 442
TimeIt AFAIK supports categories. I guess you can do it yourself with just a few lines in a template override. Something like:
Code
<!--[if $categoryInTimeItIsSelected]-->
<!--[pnmodavailable modname="News" assign="hasNewsMod"]-->
<!--[if $hasNewsMod]-->
<!--[pnmodapifunc modname="News" type="user" func="getall" property="Main" category=$categoryFromTimeIt numitems=5 assign="fittingArticles"]-->
<!--[if $fittingArticles|@count]-->
<h3>Fitting articles:</h3>
<ul>
<!--[foreach item="article" from=$fittingArticles]-->
<li><!--[$article.sid]-->: <!--[$article.title]--></li>
<!--[/foreach]-->
</ul>
<!--[/if]-->
<!--[/if]-->
<!--[/if]-->
--
Guite | ModuleStudio -
- Rank: Developer
- Registered: Aug 23, 2003
- Last visit: May 31, 2010
- Posts: 1428
Nice one Axel
Zikula power !
Craig was also developing something for Postcalendar. I have had some E-mail discussion about it. I
don't know the status of that block.
--
campertoday.nl, Module development, Dutch Zikula Community -
- Rank: Developer
- Registered: Feb 17, 2005
- Last visit: May 21, 2010
- Posts: 684
-
- Rank: Team Member
- Registered: Jan 19, 2003
- Last visit: Apr 06, 2010
- Posts: 442
For reusability a plugin would be a nice approach.
Advantages:
* It hides the complexity away from the template
* Can be used in all modules by simply providing a category as well as some optional parameters like numitems
* Can be shared in extdb (with dependency to the News module) [Edit: you can share the template set as well, did you know?
]
Example:
Code
<!--[getNewsPerCategory property="Main" category=$myCatID assign="fittingArticles"]-->
In step 2 another plugin could then use this one, wrapping the display also:
Code
<!--[displayNewsPerCategory property="Main" category=$myCatID display="unorderedList"]-->
--
Guite | ModuleStudio -
- Rank: Developer
- Registered: Aug 23, 2003
- Last visit: May 31, 2010
- Posts: 1428
Guite
you can share the template set as well, did you know?
Do you mean for the calendar display or the Formicula (other topic) templates?
--
campertoday.nl, Module development, Dutch Zikula Community -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
Quote
Craig was also developing something for Postcalendar. I have had some E-mail discussion about it. I
don't know the status of that block.
Working on it. version 6.1 will contain it
-
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
Display data from category would be a nice feature to add to the plugins in Content, so the content page's category could be used by default in the plugins display. :) (Ticket already submitted to Content for that).
--
Home Page | Find on Facebook | Follow on Twitter
- Moderated by:
- Support
