Posted 02 Nov 2009 15:34 by Ed Johnson
This design enhancement is related to [this wish] and [this discussion]. It is suggested that the image syntax be expanded so that we can display the first image that is located on a different wiki page.
Currently, the syntax supports URL and :first as source attributes for the image to display. [[image :first]] will display the first image on the current page only. You can't use [[image URL :first]] since both attributes are used to specify the source of the image.
[[image :first:site-name:category:page]] where site-name and is optional and assumes the current site if not specified.
If the parser sees :first: as the source parameter, it parses the site-name:category:page from the rest of the string and displays the first image from the page indicated. If the parser sees :first without the other page parameters, it works as it does now by displaying the first image on the current page.
This would effectively add Cross Site Include capability to the image syntax.
This is a great idea.
There's a proposal I started some time ago for a new Image Module: http://blog.wikidot.com/design:6
Want to add this content there?
Portfolio
I don't have editing permissions, but if I understand what you're suggesting, we should change this:
to this:
BTW, I really like the :random option too!
-Ed
Community Admin
How about this?
Keep things going from least specific, to most specific
Also:
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
That makes sense. To me it really doesn't matter, but your suggestion might be easier to remember without referring to the syntax help. I say which ever syntax is easiest for writing the parser code is fine.
-Ed
Community Admin
I've invited you as member.
Portfolio
Oh, and Shane's syntax proposal is right. This would be the grammar, I think:
Portfolio
This would be incredibly useful in the ListPages module. Is this still in the works?
broxen - Do you want the mustache on or off?… too bad.
I do not know what exact you need, but " first" is in the documentation implemented.
/filename I have forgotten…
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Maybe I have the syntax wrong. Can you help me?
Based upon the syntax in this thread, the above code should show the first image located here: http://sohwiki.com/main:resources
Internally, I would use this as:
Neither seem to work for me.
It would be useful in the list pages module, for giving lists of pages an icon or thumbnail for reference. For instance, this page lists all the devs from Heroic Games: http://sohwiki.com/soh:heroic-games and pulls a thumbnail from each page in the list to display next to the Title Link.
You'll see that in order to get the thumbnail, I had to name all of the images the same name on each individual page. This isn't very intuitive for a newer user. It would be much simpler, and more user friendly to be able to simply call the :first image from every item in my listpages module.
broxen - Do you want the mustache on or off?… too bad.
I would use the standard image block with the source = :first ( withoput the caregory:pagename)
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
For some reason, this syntax does not work for me within the ListPages module block. It produces HTML with ":first" in the source attribute.
Create a new page on any wiki that has images and add the following code to demonstrate the issue:
broxen - Do you want the mustache on or off?… too bad.
do not work with separate="no" as parser isnt invoked for each separate page while list pages is parsed.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
This fixed my issue. Thank you!
broxen - Do you want the mustache on or off?… too bad.