Home > struktur > English > Manuals > p-admin manuals > HowTo > Creating a menu using a factinclude for folder with an itemtemplate
Eine neuere Version dieses Facts existiert bereits.. (anzeigen:)
Creating a menu using a factinclude for folder with an itemtemplate
 

There is a possibility to create a menu in the header using factinclude for a folder.

The main idea is to create a folder, that will contain subfolders, which will appear in the header as menu items.

 

In order to do so, please follow these steps:

 

|1| Create the main folder

 

|2| Create the subfolders which will appear as menu items

 

|3| In order to personalize the appearance of the menu, you will also have to create an itemtemplate

 

In order to create an itemtemplate, follow these steps:

 

(1) Create a fact.

 

(2) Convert to HTML-mode.

 

(3) Write the code into the text field. The user can write his own css-code to define the style of the itemtemplate and use the tags below to configure which information should be extracted from the included fact.

 

The template fact can contain tags like:

 

<title/> Defines if the template should contain the title of the included fact.
<text cuttext="200"/> Defines what part of the text from the included fact should be displayed.
<image/> Defines if the template should display the first found image in the included fact.
<link/> Displays If the included fact is a link.
<meta/> Defines if the template should display the meta information of the included fact.
<id/> Displays the InfoID of the included fact.
<v/>

Displays the version of the included fact.

 

(4) After you are ready, click on the "Publish" button.

 





 

Example:

<a class="mainmenu" href="<link/>"><title/></a>

 

|4| Make a factinclude in the fact, which is used for the header, by entering the following code:


<factinclude 1234567.1 foldersonly="1" itemtemplate="1234567.0"/>

 

Please, click on the link for more information about the factinclude for folders .

 

Sample code:

 

1) Itemtemplate:
<a class="mainmenu" href="<link/>"><title/></a>

 

2) fact for the header:

<advancedparser>

<html>
<div>
<factinclude 1234567.1 foldersonly="1" itemtemplate="1234567.0"/>   
</div>
</html>

 

3) CSS Code:

 

.mainmenu{
    background: #808080;
    color: #FFF;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    padding-left: 3px;
}
div.mainmenu{
    width: 100px;
    height: 20px;
}

 

info3 - 125057.2

Note: You can put the CSS-Code at the beginning of the itemtemplate fact (surrounded with <style>), or you can put it in Padmin > Interface > Custom platform stylesheet.





Metainfo:
AutorIn: factline Webservices GmbH; Copyright: factline Webservices GmbH; Publiziert von: Ivo Marinov (factline3)
factID: 1518352.12 (...Archiv); Publiziert am 17 Nov. 2010 11:38
 
Verknüpfungen:
struktur  >  English  >  Manuals  >  p-admin manuals  >  HowTo