Sha256: 369d40aec8fb6cdf9df5284934a3633b0e91e1f02f267f29ad9696c9b428f15d

Contents?: true

Size: 1.97 KB

Versions: 1

Compression:

Stored size: 1.97 KB

Contents

---
title:  Middlemac extended <em>resource</em> methods
blurb:  <em>Middlemac</em> extends <em>Middleman</em>’s built in resource (page)
        methods by adding several methods that make developing help books even
        easier.
layout: template-logo-medium
---
<%= md_links %>
<%= md_images %>

<% content_for :seeAlso do %>
<ul>
  <li><%= link_to 'Resource API Documentation', '../reference/resource_ext_ref.html' %></li>
</ul>
<% end %>

<%= current_page.data.title %>
==============================

<%= current_page.data.blurb %>

_Resources_ in _Middleman_-speak generally refers to pages in _Middleman_’s
internal site-map. As Ruby objects, resources have a lot of useful information
about them.

Note: there’s a lot you can do with _Middlemac_ without manipulating or using
resources directly. The _Middlemac_ framework does a lot of this manipulation
for you. There’s nothing in this documentation help book, for example, that uses
features not provided by the conventions.
{:.note}


Common _Middleman_ Resources
----------------------------

Because _Middlemac_’s resources depend so heavily on the built-in resources, a
quick review and examples are in order.

`current_page` or `current_resource`
 : The `current_page` resource is available in all of your help pages, as well
   as the partials that your help pages include.

`current_page.breadcrumbs.first`
 : This refers to the top level landing page of your help file.
 
_`resource`_`.parent`
 : This references the parent resource. For example `current_page.parent` would
   refer to the parent page of this one:
   **<%= current_page.parent.data.title %>**.
 
_`resource`_`.brethren_next` and _`resource`_`.brethren_previous`
 : These _Middlemac_ supplied references refer to the next and previous pages,
   respectively, in the current group, and they are resources, too.


API Reference
-------------

Have a closer look at all of the _Middlemac_-provided resource extensions in
the [Resource API Documentation][resource_ext_ref].

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middlemac-2.0.0 documentation_project/Contents/Resources/Base.lproj/060_content/050_resources.html.md.erb