Output Functions - gtbu/Typesetter5.2 GitHub Wiki
- This function outputs the primary content of each page.
- This function will output the necessary meta, style and link information found in the <head> tag of the html document.
- This function will output the Login link so users can log in as administrators.
- Outputs only the top level links.
- Outputs all links within the user's menu.
- Outputs all 2nd and 3rd level links within the selected group.
- Outpus all 1st level links and the 2nd and 3rd level links within the selected group.
- Outputs all 1st and 2nd level links and the 3rd level links within the selected group.
- Outputs all the 1st and 2nd level links.
<?php gpOutput::Get( 'BottomTwoMenu' ); ?>
|
- Outputs all the 2nd and 3rd level links.
- Outputs only the 2nd level links when the 1st level parent is selected.
- Outputs only the 3rd level links when the 2nd level parent is selected.
Additional menu formatting options are available.
- Where $area is the name of a content area. 'Header', 'Footer', 'Side_Menu' are all standard areas. Additional areas can be added just by changing the value of area.
You can find a brief tutorial on how to add unique header and/or side menu on a per page basis in the forum here: [1].
- New in Typesetter 3.5b2, the GetImage() function allows designers to add images to themes in a way that allows end users to easily edit and customize the image. Outputs an <img /> tag.
- $image_path
- The path to the image relative to the theme's root folder. If the image is located in at /themes/theme_name/theme_color/image.png, then the path for the image would be /theme_color/image.png.
- $html_attributes
- An array of html attributes to be used in the <img /> tag. Note: Typesetter uses the id attribute for inline editing.
- These two can be used used in combination to define and output a draggable area with custom html and editable text.
This line of code defines an area named My_Html_Area that contains the html <div class="my_html_area">%s</div>
Then using this line of code, we can retrieve that html, in a user draggable wrapper with editable text.
The result will be an area in your template that a user can do two things with:
- Edit the text "This Text"
- Drag 'n drop the whole area to their desired location within their theme.
Note: gpOutput::Area() should be called before any other output functions are used in your template. Before <head>label and enclosed on php calls
By default, most of the areas outlined above can be rearranged by the user within Typesetter's administration scripts. To prevent users from being able to move an area in your theme, you can precede the function call with $GP_ARRANGE = false;. Example: