Loading...
 
Features / Usability

Features / Usability


Including modules on custom homepage

posts: 224 Ireland

Hi,

I would like to include some modules (better modules' output) on the custom homepage of my Tiki. I haved tried including some module files in the tiki-custom_home.php file but no luck. I am sure it's pretty easy to do it but just don't know how!

Regards,

pat.

posts: 175 Canada

Hi,

Unless I am compleatly off track about what you are asking here is my thought. I think you mean you just want to have a module displayed in your page. Your (better modules' output) comment makes me think I may be misunderstanding you.!

To display a module in a custom home page.
Make your changes in the templates/tiki-custom_home.tpl file.
Insert the link as noted below and away you go.
The wiki help says...
MODULE Displays a module inlined in page:
{MODULE(module=>modname,align=>left|center|right,max=>,np=>0|1,args...)}{MODULE}
Is this what you mean or are you trying to do something different?

James
ps. I prefer to use a html page for my custom pages because it is easier to add dynamic content and stuff. As well I like to have the html pages with no side bars and as I recall the custom page uses the same layout as the wiki pages.


posts: 1001 Canada

Hi patrick!
James, I think he's asking because he can't use PluginModule since he's not in a Wiki page.
I note that your ps doesn't seem to make sense, can't you add HTML straight in the tpl file?

So to answer patrick, well I had a very related discussion with Ahriman some time ago on IRC.
The discussion should get attached if things go fine :p
The key to this was Smarty's eval function.
There is a lot of crap in this discussion, don't spend your time reading it all!

posts: 175 Canada

patvdv sorry if I was sending you off in the wrong direction there! I try to make sure what I am saying works but I get a bit scattered and have a hard time remembering what I have done!confused

Chealer9: thanks for the help I was getting confused about what I have been doing (with a dozen tw's it is easy) I thought that you could put the modules into a html page but in playing with it today I guess I am wrong.

Can you not put the mod link as a dynamic content and then put that in an html page?

As far as the ps goes. This idea is mostly about how the custom home and html pages relate to the lay out per section settings. They are both as I understand able to do the html but the custom home has no independent per section settings and uses the wiki page settings.

I like to start off some sites with out any of the menus or other clutter but it is nice to have the menus there for the wiki.

James

> Chealer9:
> Hi patrick!
> James, I think he's asking because he can't use PluginModule since he's not in a Wiki page.
> I note that your ps doesn't seem to make sense, can't you add HTML straight in the tpl file?
>
> So to answer patrick, well I had a very related discussion with Ahriman some time ago on IRC.
> The discussion should get attached if things go fine :p
> The key to this was Smarty's eval function.
> There is a lot of crap in this discussion, don't spend your time reading it all!


posts: 175 Canada

patvdv sorry if I was sending you off in the wrong direction there! I try to make sure what I am saying works but I get a bit scattered and have a hard time remembering what I have done!confused

Chealer9: thanks for the help I was getting confused about what I have been doing (with a dozen tw's it is easy) I thought that you could put the modules into a html page but in playing with it today I guess I am wrong.

Can you not put the mod link as a dynamic content and then put that in an html page?

As far as the ps goes. This idea is mostly about how the custom home and html pages relate to the lay out per section settings. They are both as I understand able to do the html but the custom home has no independent per section settings and uses the wiki page settings.

I like to start off some sites with out any of the menus or other clutter but it is nice to have the menus there for the wiki.

James

> Chealer9:
> Hi patrick!
> James, I think he's asking because he can't use PluginModule since he's not in a Wiki page.
> I note that your ps doesn't seem to make sense, can't you add HTML straight in the tpl file?
>
> So to answer patrick, well I had a very related discussion with Ahriman some time ago on IRC.
> The discussion should get attached if things go fine :p
> The key to this was Smarty's eval function.
> There is a lot of crap in this discussion, don't spend your time reading it all!


posts: 224 Ireland

Hey Chealer,

Your tip did it! biggrin I got it working by including following examplary code in the tiki-custom_home.php file:

$phpfile = 'modules/mod-last_blog_posts.php';
$template = 'modules/mod-last_blog_posts.tpl';
include($phpfile);

if (file_exists('templates/' . $template)) {
        $data = $smarty->fetch($template);
} else {
$data = '';
}

Many thanks!

Regards,

Pat.

posts: 4642 Japan

> patvdv:
> Hey Chealer,
>
> Your tip did it! biggrin

Sorry but could you guys describe how to do this (have a module display from a template) in more detail?

-- Gary


posts: 4642 Japan

> patvdv:
> Hey Chealer,
>
> Your tip did it! biggrin

Sorry but could you guys describe how to do this (have a module display from a template) in more detail?

-- Gary