Intechnic
Users Developers
Home / Forums / In-Portal CMS / FAQ / Categories and Links on Home page / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

Categories and Links on Home page (1)


Posted: 01/03/2005 2:37:05 PM

Reply Quoted  


Below we posted some instructions how you can make your In-portal home page to list categories and links from your In-link root Directory (be default CatID=1).

1. Make a copy of "themes/default/inlink/index/categories.tpl" and name it "themes/default/inlink/index/categories_main_dir.tpl".
2. Make a copy of "themes/default/inlink/index/links.tpl" and name it "themes/default/inlink/index/links_main_dir.tpl".
3. Make a copy of "themes/default/categories/catlist_element.tpl" and name it "themes/default/categories/catlist_element_main_dir.tpl".

4. Place the following code in your current "themes/default/index.tpl" template (instead of the tag which lists Editor Pick Links).

<inp:include _Template="inlink/index/categories_main_dir.tpl" _DataExists=1 _NoDataTemplate=inlink/index/no_categories" />

<inp:include _template="inlink/index/links_main_dir.tpl" _DataExists=1 _NoDataTemplate="inlink/index/no_links.tpl" />


5. Go inside the "themes/default/inlink/index/categories_main_dir.tpl" template and replace:

<inp:m_list_cats _NoTable="0" _columns="2" _ItemTemplate="categories/catlist_element" border="0" cellspacing="0" cellpadding="0" width="98%" _DataExists=1 />

with

<inp:m_list_cats _NoTable="0" _columns="2" _CatID="1" _ItemTemplate="categories/catlist_element_main_dir.tpl" border="0" cellspacing="0" cellpadding="0" width="98%" _DataExists=1 />

Please note that we are specifying the category ID the links and category will be listed from. Simply change _CatId value to a different one if you'd like to do the same with some other category.


6. Go inside the "themes/default/inlink/index/links_main_dir.tpl" template and add _CatID="1" attribute to the listed below tags:

<inp:l_list_count _ShortList="0" />

<inp:l_list_links _ItemTemplate="inlink/index/link_element.tpl" _ShortList="0" />

<inp:l_link_pagenav _Label="lu_page_label" _ShortList="0" />

7. In a new "themes/default/categories/catlist_element_main_dir.tpl" template replace:

<inp:cat _field="link" />
with
<inp:cat _field="link" _Template="inlink/index.tpl" />
I believe there are two such tags in that template.

Thank you.

[Edited By Dmitry on 11/17/05 3:14:12 PM]