HELP: Adding Package contents on Custom Modules

Vince Mercer
Joined: 28 Aug 2009

HELP: Adding Package contents on Custom Modules

Posted:14 Sep 2009 (23:36 UTC)
(:exclaim:)

Hi,
I've finally managed to do Phase 1 (out of 6) of our website!

But I have a problem.

visit this page and log in using username: outsider; password: 1234abcd

artofvernard.net/portal

I wanted previous articles, events list, or previous blogs to appear on a custom Module... I added contents of last_blog_post.tpl (or something named like that) to the custom module, but it only displays the number bullet, no content.

My Question: How do I properly call out Article/Blog/Event/etc. contents into a custom module???

NOTE: If this topic is similar to another topic posted before, please link me to that topic, thank you!
Lester Caine
Joined: 24 Apr 2004

Re: HELP: Adding Package contents on Custom Modules

Posted:15 Sep 2009 (21:48 UTC)
Have you created both parts of the new module? the .php to build the data, and the .tpl to display it.
Vince Mercer
Joined: 28 Aug 2009

Re: HELP: Adding Package contents on Custom Modules

Posted:16 Sep 2009 (18:29 UTC)
I figured the PHP file has to do with it, but how do I do it? Do I do something like:

{ include phpfile.php }

then do

{ include tplfile.tpl }

I tried doing that but I broke it, sorry. (:frown:)
Lester Caine
Joined: 24 Apr 2004

Re: HELP: Adding Package contents on Custom Modules

Posted:20 Sep 2009 (23:12 UTC)
Vernard - to create a custom module you need to copy an existing one ...
These consist of module.php and module.tpl
Bitweaver will call the relevant part when you select that module is added to the layout.
It's probably worth just renaming a module first and checking that your new sample works ....
Vince Mercer
Joined: 28 Aug 2009

Re: HELP: Adding Package contents on Custom Modules

Posted:28 Sep 2009 (19:10 UTC)
Thanks!

Okay, I managed to create a custom module (besides going to administration--> Themes --> Custom Module) and made a new module out of a file... but there is still one more difficulty I am having:

How do I get the module to show the content or a parsed (summarized) description) of a post? e.g. Article, Blog, etc.

I'm going to experiment with this line, does this one work??

{$blog.post->getField('description')}

if not, how do you properly do it????????
Vince Mercer
Joined: 28 Aug 2009

Re: HELP: Adding Package contents on Custom Modules

Posted:28 Sep 2009 (22:11 UTC)
... Ah, never mind, I figured it out, it's almost like that:

{$blog.post->getField('summary')}

Thanks
  Page 1 of 1  1 
Post
If you are already registered, please enter your login credentials.
Anonymous Post