Posted by ErichSteinboeck on 28 Jun 2008 17:32, last edited by Venryx on 16 Dec 2012 00:52
: attributes dynamic module parameters url
For most Wikidot module calls you can specify (module-specific) attributes (names and values) on the [[module …]] call. An example would be [[module PageTree depth="1"]], where “depth” is the attribute name and “1” its attribute value.
Unspecified attributes take on their default values.
Some of those attributes, if either
- not specified on the [[module …]] call, or
- for recently changed modules ListPages and PageCalendar, specified with the special parameter value “@URL”
can have their attribute values specified dynamically via the calling URL (Uniform Resource Locator).
How it Works
The syntax for dynamically specifying module attribute values via the calling URL is
http://wiki-name.wikidot.com/page-name/attribute-name/attribute-value, where
- wiki-name is the name of your Wiki
- page-name is the name of the page, where the call to the module (whose attribute you'd like to specify) is coded,
- attribute-name is the name of the attribute you'd like to specify
- attribute-value is the value that attribute-name should take on
Wikidot itself uses URL-specified attributes in many places. For example:
- Search. Module “Search” has an attribute “q” (whose value is the string that Search should search for), that normally isn't specified on the [[module Search]] call. As the page search:site usually contains a call to [[module Search]], you can call http://wiki-name.wikidot.com/search:site/q/search-value to search for the string search-value.
- Pagination. Modules like ForumCategory, ListPages, or Search that support automatic pagination use attribute “p” to specify the number of the page to display (…page-name/p/page-nr)
- Redirect. If attribute “noredirect” specified via the URL as …page-name/noredirect/true module Redirect will not redirect.
Which Module Attributes Can be Specified Dynamically?
Not all module attributes can have their attribute values specified dynamically. To find out which can, see the following list:Attribute Can be Specified via URL | ||
---|---|---|
Module | Yes | No |
Comments | comments | hide, title |
Feed | module_body | limit, offset, src |
FlickrGallery | contentOnly, disableBrowsing, groupId, groupUrl, limitPages, pageNumber, perPage, photosetId, size, sort, tagMode, tags, userName | |
ForumCategory | c, p, sort | |
ForumNewThread | c, title | |
ForumStart | hidden | |
ForumThread | t | |
FrontForum | category, feed, feedDescription, feedTitle, limit, module_body, offset | |
ListPages | date, limit, nextBy, order, p, perPage, previousBy, t, tag, tags, tagTarget, created_by, urlAttrPrefix | appendLine, categories, category, module_body, prependLine, rss, rssTitle, separate, skipCurrent |
ManageSite | start | |
Members | from | group, showSince |
MiniActiveThreads | limit | |
MiniRecentPosts | categoryId, limit | |
MiniRecentThreads | limit | |
NewPage | button, category, format, size, style, template | |
NextPage | by | |
PageCalendar | date, tag, tags, urlAttrPrefix | categories, category, startPage, targetPage |
Pages | category, details, limit, order, preview | |
PagesByTag | category, t, tag | |
PageTree | depth, root, showRoot | |
PetitionAdmin | withoutBox | |
PetitionList | id, limit | |
PreviousPage | by | |
Rate | pageId | |
RatedPages | maxRating, minRating, order | category, comments, limit |
Redirect | destination, noredirect | |
Search | a, mini, p, q | |
SearchAll | a, p, q | |
SearchUsers | p, q | |
SignPetition | confirm, id | |
SimpleToDo | id | |
SitesListByTag | lang, tag, title | |
TagCloud | categories, category, limit, maxColor, maxFontSize, minColor, minFontSize, target | |
ThemePreviewer | noUi, theme_id |
Example
This example shows how you can let users choose a page for which they'd like to display a “PageTree” site map.
To see the different results, click on the How-To Topics, Community How-To's, and Welcome links shown.
Show site map for top-level page \
[/howto:module-attributes-via-url/root/howtotopics:page-content How-To Topics], \
[/howto:module-attributes-via-url/root/howto:howto-list Community How-To's], \
[/howto:module-attributes-via-url/root/start/depth/1 Welcome] (first level only)
[[module PageTree showRoot="yes"]]
Show site map for top-level page How-To Topics, Community How-To's, Welcome (first level only)
- Forums
- Non-Wikidot Related
-
Others
- Add a Custom Google Search Engine
- Add Links To Acct Profile Settings
- Be Notified - RSS Feed Guide
- Customise The Wikidot Editor
- Embed Animoto
- Embed Flickr Video (limited workaround)
- Embed Google+ Button
- Embed Twitter
- Getting Started Guide
- Logout From Wikidot
- Multi-PM Bookmarklet
- Subscribe To Community Sites And Forum Changes Via Feedblitz
- Use Forum Option Buttons
- Use Page Option Buttons
- Using the Wikidot's editor
-
Page Content
- Add chessdiagrams
- Adding your first Live Template
- Add Matlab code block
- Apply a Wikipedia-like "article - discussion" tabs to existing pages
- Apply A Wikipedia Like Talk Button
- Autonumber headings and ordered lists
- Autoparenting
- A Wikidot Page Explained
- Boxes and Tables with Rounded Corners
- Boxes with Shadows
- Button Links
- Change Tagcloud Colors
- Change the title in TOC
- Convert MediaWiki syntax to Wikidot
- Count members
- Count tablerows
- Create a Blog based on category blog:
- Create a Blog with Forum and Frontforum
- Create a fully functional Blog
- Create A Journal
- Create a news entry list
- Create Sortable List of Pages
- Date: How Long Ago?
- Direct Links to Sub-Pages of System Pages
- Easier way to Install Wikidot Packages
- Embed a Live IRC Chat
- Embellish Text. Some Examples
- Feed/FrontForum/ListPages/live template — %%date%%
- Find Untagged Pages
- Google Maps - different methods
- Hide Form Data With Data Form Templates
- Hide Print
- How to make MouseOver-Popup
- How To put a StumbleUpon button on your page
- How To Use The Dollar Codestring
- Iframe Link
- Import Ms Word -Text Into Wikidot
- Import Simple Excel Tables Into Wikidot
- Include a Forum Thread
- Include Inline
- Include Part Of A Page Only
- Include Part Of A Page Only (Tricky Version)
- Include Variables with Special Characters
- Include With Defaults
- Inline Hover Tips
- Interactive Map with Links
- Keep hidden tags really hidden in tags area
- Listing Un-Parented pages
- ListPages: Automatic Header
- List pages for current logged in user only
- ListPages - titles like a tagcloud
- Maintain Transparency in Resized Images
- Mass-tagging of pages with Wikidot-API
- MindMaps in Wikidot
- Mix and Match CSS Classes
- Module Attributes via URL
- More on Math Syntax
- Multi-Columns
- Multiple columns for footnotes
- Nested Comments
- New table layout with ROW and CELL tag
- Override Inline Styles With CSS
- Page Count
- Play Music
- Put pictures with footnotes in the text
- Put Pictures With Footnotes In The Text Using Divs
- Put Youtube video with footnotes in text
- Redirect a complete category
- Replace bullets of a list by pdf icons
- Set Up An Infobox
- Set Up An Infobox — default picture
- Set Up an Infobox — Exclude Specific Attributes
- Show or hide page-tags by your control
- Show page to specific users only
- Sortable Tables
- Sortable-Tables-Js
- System Variables
- System Variables: Details
- TabView Colours
- Tabview with ListPages
- Text Shadows
- Track Site And Forum Changes In One Page
- Use Anchors on a page
- Use Hash Magic Urls for option buttons
- Use html scripting
- Wikidot Includes: For Beginners
- Wikidot Includes: For Experts
- Wikidot Include Techniques
-
Site Management
- Add Admins Or Moderators To Your Site
- Add a "Hidden" Menu to nav:top
- Backup stuck at "queued for processing"
- Change the background
- Create an Automatic Navigation without parent-childs
- Create and Use Tag Trees
- Create Categories
- Create Multiple Word Tags
- Create Protected Page Tags
- Create Templates
- Creating your first Wikidot site
- CSS: import and use different fonts
- Customize the Landing Page for a Private Category
- Design Your Own CSS Theme
- Email notifications
- Enable AdSense
- Fiddle with CSS – the easy way.
- Go Mobile
- Hide forum signatures
- Hide the Admin menu
- How Many Days Does Your Wiki Exist
- How To Add Private Pages On A Wiki The Easy Way
- How to let people join my site?
- How To Put a Private Page On a Public Wiki-typ1
- How To Put A Private Page On A Public Wiki Typ2
- Interface Design
- Making a site multi-lingual
- New Wikidot Site Checklist
- Promote Your Site
- Rename Existing Site
- Send E Mail invitations
- Setting up a custom domain
- Setup an "Educational Wiki"
- Site statistics – visitors tracking, hit counters, etc.
- Themes: An Idiots Guide
- Use a logo within your site
- Using Ratings
Links
For an application of this idea see Sortable List of Pages
Backlinks
Author
ErichSteinboeck ErichSteinboeck . Please visit his/her userPage.
Related articles
Comments
Erich,
Have you found a way to simulate the offset attribute which is available with the Feed module but not with the ListPages module ?
lowkarma.pnggerdami - Visit Handbook en Français - Rate this howto:import-simple-excel-tables-into-wikidot up!
> a way to simulate the offset attribute which is available with the Feed module
Only in a rather crude way. Back in June last year I posted a suggestion in a thread that discussed how to break up ListPages output into chunks.
I tried to pass tag via URL
http://sky-tests.wikidot.com/last-pages/tag/hi
it did not work
tha only parameter I can pass is "p", like
http://sky-tests.wikidot.com/last-pages/p/4
how can I pass "created_at" ?
like
http://sky-tests.wikidot.com/last-pages/created_at/last%201%20week
http://sky-tests.wikidot.com/last-pages/created_at/last%204%20week
nevermind, I think I got it
[[module ListPages separate="no" tag="@URL" perPage="5" created_at="@URL"]]
* %%title_linked%%
[[/module]]