Документация на Structure 1.3.1

Статус
В этой теме нельзя размещать новые ответы.

indaukr

Постоялец
Регистрация
25 Авг 2007
Сообщения
60
Реакции
13
Кто-нибудь может поделится документацией на эту версию?
Ну или может кого завалялась Structure>2?
 
Присоединяюсь к поиску доки для 1.3.1
Или может кто выложит свежую версию расширения?
 
Это к версии 1.2.2
Installation
Make sure the native EE Pages module is not installed, uninstall if not
In each weblog, turn off "Display Pages Submission Fields." Otherwise, it will attempt to post Pages data and cause an error.
Enable the extension CP jQuery under Admin » Utilities » Extension Manager
Copy extensions/ext.structure_ext.php to /system/extensions/
Copy language/english/lang.structure.php & land.structure_ext.php to /system/language/english/
Copy themes/structure directory to your current cp theme folder under /themes/cp_themes/your_theme
Copy modules/structure to /system/modules/
Enable the extension under Admin » Utilities » Extension Manager
Go to the Modules tab
Click "Install" in the row for "Structure"

Getting Started

Setup your weblogs & custom fields
Assign which weblogs Structure will use under Structure » Settings
Assign default templates for each weblog under Structure » Settings
Create your first entries through the Publish tab and add URIs under the Structure tab while editing the entry
Further pages can be added by the same method and assigning parents under the Structure tab or through the “add page” link next to each page
Structure will automatically generate URIs for you if you leave them blank
A full tutorial can be found on Jambor-ee

Configuration

Templates can be changed any time per page by editing the “Template” dropdown under the Structure tab when editing an entry
Various changes and preferences can be set under Structure » Settings
Weblogs: select where Structure can post data to
Default templates: select which templates entries should be attached to
Administer Structure: users can make changes to Structure settings and have unlimited reordering capability
View publish/edit Structure tab: users can view the Structure tab when publishing or editing to update URLs, change templates and manage listings.
Access Structure page: users can access the Structure module
View add page link: users can use the “add page” functionality
Can reorder (limited:( users can reorder pages within the same level, except top level pages (this stops them from breaking top level or main navigation)
Can delete (limited:( users can delete Structure pages (except top level pages), but it does not delete the entry
Clicking “add page” next to an existing one creates a child page and utilizes the same weblog as the parent

Displaying Content & Linking to Pages

A regular weblog tag will display content as long as you don’t have dynamic="off" as a parameter in {exp:weblog:entries}. Pages can be linked to within {exp:weblog:entries} with the variables {page_uri} and {page_url}.

Adding Listings

A page with “static content” can also have a listing. This is basically a bridge between the publish and edit tab with Structure for easier access for authors. This places “Add / Edit” links next to the page name. “Add” cues a new entry for the weblog it’s assigned to while “Edit” cues the Edit tab and sorts entries for only that weblog. This can only be done if you have a weblog not being used for your “static” pages and can NOT be shared with another listing. By assigning the default template under Structure » Settings you decide which template those single entries use.
When editing an entry use the Structure tab to mark the checkbox for “Listing”
Select which weblog you want the listing entries to post to (this is NOT the weblog the “page” content will post to, but what the “Add / Edit” links use)
The template your main listing page uses will need a {exp:weblog:entries dynamic=”off” weblog=”YOUR_LISTING_WEBLOG”} to display the entry listing
Once on the single entry/detail page any {exp:weblog:entries} tag will display content as other normal Structure pages.
Asset Weblogs
Assets give you an easy way to manage non-structural weblogs from the same control panel page as your sitemap view. You assign a weblog as an asset under the settings menu. This extra panel appears below your pages and has an "Add / Edit" set of links, just like listings. No Structure data is added to these entries. These extra areas are good for elements and data that authors/clients need access to edit, but are not specific to a certain page.

Main Navigation

{exp:structure:nav_main exclude_status="hidden|no_main_nav"}
The nav_main tag outputs all of your top level pages into an <ul>. The tag will automatically add class="here" to the current page’s <li> and class="last" to the last <li>
Exclude Status
The parameter "exclude_status=" can be used to hide any single or multiple user defined statuses using the pipe character.

Sub-Navigation

{exp:structure:nav_sub exclude_status="hidden|no_sub_nav" start_from="/about"}
The nav_sub tag is intended for sub-navigation and will show up to two levels of <ul>s at a time. It dynamically shows pages at the same level and jumps to a child’s level if it has children itself. The logic is for a very specific use and at this time does not include attributes to control it’s output. The tag will automatically add class="here" to the current page’s <li> and class="last" to the last <li>

Exclude Status

The parameter "exclude_status=" can be used to hide any single or multiple user defined statuses using the pipe character. This is useful for form confirmation or non-structural pages you don't want to appear in the sub-navigation
Start From
The parameter "start_from=" can be used to display a different page's children. Defaults to the current page's children and the logic above if not set.

Breadcrumbs

{exp:structure:breadcrumb}
The breadcrumb tag displays in a standardized format and has a few parameters to control its output.
Format
Path » To » This » Page » Here
Home Link
{exp:structure:breadcrumb inc_home="no"}, "yes" by default
Include "Here" (current page)
{exp:structure:breadcrumb inc_here="no"}, "yes" by default
Page Title Instead of "Here"
{exp:structure:breadcrumb here_as_title="yes"}, "no" by default
Wrap Each
<ul>{exp:structure:breadcrumb wrap_each="li"}</ul>, empty by default (do not include < or > around tag)
Wrap Here
{exp:structure:breadcrumb wrap_here="em"}, empty by default (do not include < or > around tag)
Separator
{exp:structure:breadcrumb separator=":"} (spaces are automatically added around the element), "»" by default
Include Separator
{exp:structure:breadcrumb inc_separator="no"}, "yes" by default
Wrap Separator
{exp:structure:breadcrumb wrap_separator="span"}, empty by default (do not include < or > around tag)
Several parameters have been contributed by Aaron Gustafson @ easy-designs.net - thanks, Aaron!

Title Trail

{exp:structure:titletrail}
The titletrail tag displays in a standardized format and has a few parameters to control its output.
Format
Page You're On » Parent Page » Top Level Nav » Site Name
Seperator
{exp:structure:titletrail separator=":"} (spaces are automatically added around the element), "|" by default
Reverse
{exp:structure:titletrail reverse="yes"} Outputs "Site Name » Parent Page » Page You're On"

Parent Title

{exp:structure:parent_title}
Returns the current page's parent title

Pagination

{exp:structure:paginate parse="inward"}{exp:weblog:entries weblog="your-weblog" dynamic="off" limit="10"}{/exp:weblog:entries}{/exp:structure:paginate}
Requires parse="inward" and retrieves all needed data/params from {exp:weblog:entries} tag it surrounds. The offset parameter is NOT required in contained weblog tag
Location
{exp:structure:paginate location="both"} where to show the pagination, "bottom" by default
First & Last Links
{exp:structure:paginate show_first_last="no"}, "yes" by default
Next & Previous Links
{exp:structure:paginate show_next_previous="no"}, "yes" by default
Show Page & Total
{exp:structure:paginate show_page_total="yes"} displays "Page 1 of 42", "no" by default
Type of Pagination
{exp:structure:paginate mode="jumping OR sliding"} "jumping" shows a set of XX amount of links while "sliding" always show XX amount before and after the current page, "sliding" by default
Number of Pages to Show
{exp:structure:paginate show_num_pages=""} if mode = jumping it will show that amount of links at a time, if mode = sliding it will show that amount before and after current page
Text: First Link
{exp:structure:paginate first="« First"} changes the link text, "First" by default
Text: Last Link
{exp:structure:paginate last="Last »"} changes the link text, "Last" by default
Text: Previous Link
{exp:structure:paginate previous="« Previous"} changes the link text, "Previous" by default
Text: Next Link
{exp:structure:paginate next="Next »"} changes the link text, "Next" by default
 
Спасибо, тебе, Будулай.
Хотя уже начал делать все sql-запросами и structure_entries. Тоже штука неплохая.
 
Structure entries - дает достаточно удобный код, в частности для я использую для навигации и генерации карты сайта. Естественно, если в проекте используется structure
 
Structure entries - дает достаточно удобный код, в частности для я использую для навигации и генерации карты сайта. Естественно, если в проекте используется structure

разве structure дает неудобный код?
 
разве structure дает неудобный код?
посмотрел на structure entries поближе. таки вы правы, он гораздо гибче нежели исходный structure при выводе структуры.

но есть один неприятный глюк.
кодировка - utf-8, всё нормально работает. structure выводит в нужной кодировке, а structure entries выводит кракозябры. мож кто сталкивался? как пофиксить structure entries?
 
посмотрел на structure entries поближе. таки вы правы, он гораздо гибче нежели исходный structure при выводе структуры.
но есть один неприятный глюк.
кодировка - utf-8, всё нормально работает. structure выводит в нужной кодировке, а structure entries выводит кракозябры. мож кто сталкивался? как пофиксить structure entries?

Баг с кодировкой наблюдался в 1.0.11.
Вопрос решился установкой последней версии 1.0.13.
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху