Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- 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
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 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
List members in a certain group in a block
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
No need for a specific block to do this..... pnRender template magic can provide you exactly what your after in a far more configurable way.
1) create a new block of type pnRender/custom pnRender block
2) Set the module name and template name (e.g. Blocks and ourstaff.htm)
3) create the template defined in the previous step (e.g. modules/Blocks/pntemplates/ourstaff.htm)
4) add the following, sample, HTML into the template. Substitute the value gid in the first line to match your chosen group ID.
Code
<!--[pnmodapifunc modname=Groups func=get gid=2 assign=ourstaff]-->
<ul>
<!--[foreach from=$ourstaff.members item=member]-->
<!--[pnusergetvar name=uname uid=$member assign=uname]-->
<li><a href="user.php?op=userinfo&uname=<!--[$uname|pnvarprepfordisplay]-->">
<!--[$uname|pnvarprepfordisplay]--></a></li>
<!--[/foreach]-->
</ul>
The sample template i've posted simply puts the users names (with a link to the profile) into an unordered list that can be styled with CSS. Obviously you can change the markup as required.
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Helper
- Registered: Dec 31, 1969
- Last visit: May 07, 2010
- Posts: 507
Mark (or others)
I spent about an hour looking for code like this (probably due to my own ineptness) and finally found it here by hitting upon just the right terms. But I've had to do this before.
Is there a nice concise list of standard template variables and functions available somewhere? -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
There's no definitive list perse since modules can provide thier own tags and, via the pnmodfunc and pnmodapifunc tags, you can access any module GUI or API function. Saying that take a look at
- The smarty docs for tags provided directly by Smarty
- The pnRender subpackage of the .8x system modules docs contains a list of tags provided by pnRender - bear in mind that some tags are .8x only.
-Mark
--
Visit My homepage and Zikula themes.
- Moderated by:
- Support
