This section on the Community is no longer supported, in favour of Wikidot's Official Feedback Site.
It is retained here for archiving purposes.
Wish List
Tags
Posted by gerdami on 25 May 2008 15:21, last edited on 08 May 2010 01:59
This wish is open |
Description
From recent posts, it seems that there is a need for system variables such as:
[$currentPageName] i.e. cat1:pagename %%page_name%%
[$currentPageCategory] i.e. cat1:pagename %%category%%
[$currentPageFullName] i.e. cat1:pagename %%full_page_name%%
[$currentPageTitle] %%title%%
[$currentPageCreatedBy]] i.e. the first author %%author%%
[$currentPageCreatedDate]] i.e. the creation date %%date%%
[$currentPageLastEditedBy]] i.e. the last editor %%updated_by%% and %%updated_by_linked%%
[$currentPageLastEditedDate]] i.e. the last edition date %%updated_at|format%%
[$currentPageLastEditedTime]] i.e. the last edition time %%updated_at|format%%
[$currentUserName]] [[module ListUsers users="."]]
[$currentPageFirstImage] i.e., filename of first image uploaded in format: image.jpg (Not needed? Just use [[image :first]].)
[$numberOfPages] might be interesting or [[module CountPages options]]
[[module CountPages]] and [[module CountPages category="cat1"]]
* current wiki %%site_title%%%%site_name%%%%site_domain%%
* current username [[module ListUsers users="."]]
* number of users per wiki (There is a workaround to do this, but it's for Pro accounts only, so not crossing this off yet)
* number of active users (over the last N days or weeks or months or years)
* current page name (with and without the category: )
* total number of pages [[module CountPages options]]
* total number of pages, templates or system pages excepted [[module CountPages options]]
* total number of categories
* number of pages per category [[module CountPages category="cat1, cat2"]]
* number of words per page (for hartnell's ztags …) (There is a variable for length of page in # of characters, but not # of words)
Links to forum Posts
- http://community.wikidot.com/forum/t-13674/system-variables-needed
- http://community.wikidot.com/forum/t-13674/system-variables-needed#post-38271 (Michal's reply)
- http://community.wikidot.com/forum/t-26013/highlighting-pages-in-side-bar
- http://www.wikidot.com/forum/t-59612/templates#post-187066
- http://community.wikidot.com/forum/t-74651/dynamic-page-names#post-221296
Live templates
Added on 14 November
Some of the requested systeme variables have been implemented through the live templates, look for paragraph on Page variables within the _template (new!!!).
However, one missing variable in the context of live templates but also of the ListPages module is the %%right-part-of-the-pagename%%.
See my blog post Multilingual wikidot site - the missing puzzle piece for illustration. %%page_name%%
Rate this Wish
We encourage you to "rate" the suggestions. The higher the rating, the better the chance of the wish being granted (well, possibly).
[$currentThread] might let people sign up for emailed responses to their forum posts, requested here.
This could really cut down on repetitive entry for bloggers.
I added [$currentPageFirstImage], which would be helpful for blogs that display an image with each post, and cut down on the workload a little further.
I suggest implementing this feature exactly as it currently works in live templates, i. e. %%page_unix_name%%, not [$currentPageFullName]
I reckon this wish needs to be rewritten in light of the variables of the Live Templates and ListPages module.
%% variables seem to apply to a page that's being called/summoned. The _template summons the category page and applies the variables, the ListPages module summons pages and applies the variables. I realise that this is more-than-likely NOT how it works, but you get the picture.
So if %% variables apply to summoned pages, we need some other paired symbol to make variables apply to the current page. Perhaps $$ ? This way, you can differentiate between other code:
All $$ variables would mirror the %% variables. What do you think?
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
You're making a good point.
A similar situation — two or more module ListPages calls on a single page should be able to distinguish their respective parameters — was implemented using a prefix to the parameter (see urlAttrPrefix in Listpages doc).
So we could suggest a similar approach here:
Easy for beginners, no change to existing code, no need to know the more sophisticated syntax except if you really need it.
An example would be
I've posted a workaround for system (and user) variables in the Community How-To System Variables. For the technically interested, there's also a document covering technical details of it.
Woaw, this wishlist has been implemented at about 89% … and counting.