Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


How do I get my home page to look like yours?

posts: 104 France

I want to have a static bit at the top of the page to explain to people how to find stuff, then the articles which appear underneath dynamic in time.

I thought I could do this using custom home, but am bewildered how it works. I tried just putting
"tiki-view_articles.tpl"
right at the bottom of the page (between squiggly brackets of course) but it doesn(t show anything - I must be doing something wrong, but what? Should I be including the path? Or referring to PHP files perhaps? Or putting it inside a DIV?

Oddly enough, if I put "tiki-read_article.tpl" it does show just the blank format for reading an article

Help appreciated.

posts: 154 United Kingdom

The tw.o home page is displayed using a wiki page. This means you can insert any text you want and underneath you can use the articles plugin to display the articles. You do not need to change any tpl to do this.
If unsure of plugins go to wiki help when editing a wiki and press the link for plugin help in the right corner of the help box.


posts: 2881 United Kingdom

If you want to play with TPL files, read the Smarty manual first 😊 http://smarty.php.net

Its a very powerful template engine, with no limits on what you can do

Damian


posts: 4662 Japan

This is the method I used for cunningham-lee.com, my family site. I also wanted to have an intro section at the top of the page and news articles below (but fewer articles listed than on the main view_articles page). I made a copy of tiki-view_articles.php and renamed it tiki-index2.php. The only changes in the file were to replace the maximum articles to show ($maxArticles) with a hardcoded number to limit articles on this page (around line 112), and to point to the new template associated with this file, near the bottom: "$smarty->assign('mid','tiki-index2.tpl');".

This tiki-index2.tpl is a copy of tiki-view_articles.tpl with these changes: There's a new div and table at the top that contains a "content id=1" tag. This content — the headline and paragraph at the top of the page — is Tiki dynamic content so it can be edited within Tiki. Actually I put a banner zone in the template as well, to display the random photos. The banners are html type and specify a floating div containing an image. These are displayed randomly as they are all for the same banner zone. (A variation can be seen at the Phoenix Developer Consortium site, which uses the same file changes and gets edited via Tiki's dynamic content feature.)

In Tiki's general Admin section, I set tiki-index2.php as the site index page. I didn't use a wiki page and the articles plug-in because, at least at that time, article topic images weren't displayed by the plug-in. I don't know if that has changed.

-- Gary (chibaguy)


Upcoming Events

1)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3) 
Tiki birthday
4)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting