|
Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs * Digital Inputs * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning * Adding Outputs * Adding Drivers Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt |
(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login PmWiki /
IncludeOtherPages(:Summary: PmWiki group header. Includes styles and trail.:) (:comment please leave the multiple style definitions concatenated as a single line. Linebreaks do appear in the output when the wiki is configured with linebreaks enabled -- thanks!:) (:comment included in PmWiki localisation headers and footers :) authors (intermediate)
(:nl:)(:Summary: Include contents from other PmWiki pages:)
(:Audience: authors (intermediate) :)
The SyntaxThe basic syntax is
* (:include PageName:) The full syntax is * (:include FullName#fromanchor#toanchor lines=''12..34'' self=''0'' basepage=''abc'' variable=''value'' :) ParametersThe directive can have multiple Name parameters with or without anchors, and multiple template variable parameters. Named pages(:include PageName:) (:include Group.PageName:) (:include Page1 Page2 Group1.Page3 Group2.Page4:)Includes the entire text of another page into the current page. Multiple pages may be specified, but only the first available is included. You can use the above feature to ''display an error message if an include fails''. Create a page, eg. Site.IncludeFailed containing the error message. You can use any page name. Then, in your include markup, append this page at the end of the page list: (:include Page1 Page2 Page3 Site.IncludeFailed:) A slightly more complex approach is outlined at the talk page. #From#To anchors
Note: do not put whitespace between "#from" "#to" Note: text on the same line as a closing anchor but preceding the closing anchor will '''NOT''' be included in the text. Example Below: [[#start]]some text on the first line some text on the last line [[#end]]The above, when included via (:include PageName#start:) will have the text on the first line but not the text on the last line.
Note: Previous versions of PmWiki allowed whitespace between -> Lines=from..to
Self=
Page text variables
Basepage=
Name: {$:Name}
Address: {$:Address}
then the directive
-> (:include TemplateName basepage=PageName:)
will retrieve the contents of TemplateName, treating any page variables and links as being relative to PageName.
In particular, the values for {$:Name} and {$:Address} will be taken from PageName, but things like {$Title} and {$LastModifiedBy} would also work here.
Basepage usageThe primary purpose of basepage is to allow the inclusion of pages in a way that mimics the 2.1.x behavior where page variables
and links are interpreted relative to the currently displayed page.
This is done with:
-> -or- -> It also allows GroupHeader and GroupFooter to have their page variables and links be relative to the currently displayed page (instead of GroupHeader and GroupFooter): >>pre<< ## PmWiki default >><< Otherwise, using IncludeOtherPages inside of a GroupHeader would display 'GroupHeader' and not the name of the currently displayed page. The basepage= parameter is general enough that it can also be used as a templating engine, so that
we can grab a template page containing variables that are then filled in with values from another page:
-> And, of course, a single TemplatePage can actually contain multiple templates delimited by anchors, so that we end up with a syntax eerily similar'^[1]^' to pagelist-templates: >>pre<< >><< So then TemplatePage can use a syntax like: >>pre<< <:pre,1>
[[#abc]]
...template stuff here...
[[#abcend]]
>><< and it's possible to display TemplatePage as a template without it being interpreted... same as we do for Site.PageListTemplates. -< '^[1]^'Okay, maybe it's not so eerie, given that the pagelist template code actually uses the same function as (:include:) to grab its templates. But it's still a useful parallel. Specifying variables as parameters: Use sections as templatesYou can also specify variable values inline with the include statement, and refer to the variables in the template using the This assumes that a site has For example, on my included page ("template") I might have this:
Then, including that section above (that section is available via the section @@
If a value contains spaces, quote it:
''See also Specific markup
The purpose of See this thread and this thread for more info.
Parameter ReferencesAny parameters supplied to an include statement (whether they are keywords or not) are accessible inside the included page as a special Notes* You can also say Styling NoteBy default, Included pages or lines cannot be distinguished from other text on the page. To provide a visual indication that this text is special, you can apply Wiki Styles. For example:
Notes about use with conditional markupThe When testing variables in included pages the context of the page (source or target) can be useful. See special references for details. ---- See Also* Page text variables Page variables automatically made available through natural or explicit page markup * Cookbook:IncludeUrl FAQQ: What's the maximum number of includes that can exist in a page?
-> My site seems to stop including after 48 includes. ( A: By default, PmWiki places a limit of 50 include directives for any given page, to prevent runaway infinite loops and other situations that might eat up server resources. (Two of these are GroupHeader and GroupFooter.) The limit can be modified by the wiki administrator via the Q: Is there any way to include from a group of pages without specifying by exact name, e.g. between Anchor X and Y from all pages named IFClass-* ? A: This can be achieved using page lists. Q: There appears to be a viewing issue when the included page contains the (:title:) directive.
A: In a default installation, the ''last'' title in the page overrides previous ones so you can place your (:title :) directive at the bottom of the page, after any includes. See also Q: How to test to see if the page is part of another page? A:
Q: Is there any way to include (chapters of) pages which are protected (authuser.php)? A: You can achieve this the other way around: have the public sections in a public page (passwdread=@nopass or @_site_read) and include those into both the protected page, and the public page. A: Note that it is '''strongly recommended to NOT''' hide sensitive content inside a conditional in an unprotected page. (:nl:)(:Summary:Trail and talk page links:) (:comment included in PmWiki localisation headers and footers :) <<? >>bgcolor=#ffe border-top="1px solid black" font-size=.8em<< This page may have a more recent version on pmwiki.org: PmWiki:IncludeOtherPages, and a talk page: PmWiki:IncludeOtherPages-Talk. >><< |
(:Summary: Website page footer:)
Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login
Page last modified on August 30, 2019, at 11:41 AM