Wow… Wikidot has come so far. This is going to be a tremendous help and reduce all the manual duplication of code on my sites.
Wow… Wikidot has come so far. This is going to be a tremendous help and reduce all the manual duplication of code on my sites.
Thanks, I have been looking forward to cross site includes for a while now.
I think it is a very important and useful addition to the Wikidot module suite.
Wayne Eddy
Melbourne, Australia
LGAM Knowledge Base
Contact via Google+
As much as I was looking forward to this I didn't think of the negatives till now so I have to ask;
Does this mean someone can do includes from other sites without a site owners permission? Will it expose pages from private sites?
The new improvements are so great that make one think: are we close to anything like cross-site backlinks? and listpages (like, selecting everything with the same tag in two different sites)? Just dreaming — but I've learned that the Wikidot fairy grants wishes when one least expects…
Thanks, guys, for the amazing job!
I think the better option is to just have one site for everything that is related in some way.
With private categories in a public site [ not yet implemented :( ] a single site will meet all of your needs.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Thanks for this! I'm liking the Page Manager, but it doesn't show up cleanly on my site: all the stuff found in popup windows here http://modules.wikidot.com/include:12 is listed explicitly on the page, making for weird spacing.
It's a CSS issue. You'll want to add this to your custom theme's CSS (I think this catches all the items you need). We're going to have to work on adding CSI instructions for the pieces of CSS needed for some of the userspace modules. This might require breaking up our CSS into several pieces to handle situations just like this. Let us know if this works for you. Using Webdeveloper on your site and adding this to the CSS seems to work fine, but you may want to tweak the colors in the .layout elements to match your site better.
-Ed
/* Pop-up hover text over images or links */ /* Use: [[span class="hover"]]Image or link[[span]]Hover text[[/span]][[/span]] */ .hover span { display: none; } .hover:hover span { position: absolute; display: inline; margin: 20px -20px 0 0; height: auto; width: auto; background: #eee; border: 1px solid #555; color: #555; padding: 1em; font-size: 12px; } .hover:hover span span { position: relative; margin: auto; height: auto; width: auto; border: none; padding: 0; } .hover:hover { background-color: transparent; text-decoration: underline; } /* For PageManager module (http://modules.wikidot.com) */ /* Table style is layout, header/footer are top & bottom rows */ .layout { border-collapse:collapse; color:#3B485F; width: 100%; table-layout:fixed; } .layout tr { background: #FCFFDF; border-bottom:1px solid #EFEFEF; } .layout td { padding-left: 1em; } .layout .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .layout .header { height: 2em; background: #AFCCFF; border-bottom: 1px solid #9F9F9F; font-weight: bold; font-size: 13px; } .layout .footer { background: #FCFFDF; border-top: 1px solid #9F9F9F; border-bottom: 1px solid #9F9F9F; font-weight: bold; }
Thanks, Ed. That works very well. I haven't used CSS before, but that was simple enough. I tried it out with Web Developer and then added it to a custom theme. I couldn't figure out how to change the color of the sorting texts in the header (Title, Author, etc.), but it's fine as is.
Beyond CSS instructions, it would be great if these includes were somehow configurable. For example, I might not want to choose the items in Page Manager's popup menus or stay with an older version of the CSI-ed page when the author updates it. This could be done by letting each CSI page have several versions on modules.wikidot.com: the mainline version and custom versions that one can choose via the data forms module (once it exists)…?
EDIT: Thanks, Rob. That's just what I was looking for.
You could add another line to your CSS (at the bottom) as follows to set the author etc to white:
]
.layout .header a:link, .layout .header a:visited {
color: #ffffff;
}
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
I tried including from a private site. I expected it to work… but it didn't.
Every time I attempted to save a page that was including from a private site, I got this message:
The ajax request failed. Please check your internet connection or
report a bug if the error repeats during your work.
code:500
Every time I attempted to save a page that was including from an open or closed site, it worked perfectly fine.
And something really strange… I changed my private site to closed, added the include (which worked), then changed the site back to private. However, after logging out, clearing cache and refreshing several times, the content still appeared there. What is up with that? :S
This would be really useful. For example, adding this to a private site:
* [# Admin]
* [[[admin:themes|Manage theme]]]
* [[[admin:manage|Site manager]]]
Then including that in a public site… should theoretically only show the menu to those that are also members of the private site. For example, a private site that only admins are a member of.
This could go further… by only showing a comments module on a page if it's an admin looking at the page (e.g. private admin discussion)
It could also lead to showing something completely different based on who visits the page. If you have two groups of users, both a member of WikiA, but split between WikiB and WikiC, then you could do this:
[[include :wikib:page]]
[[include :wikic:page]]
And the two groups of users would see different things (whilst anonymous users would see neither)
Any chance of getting this working? ;-)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
I can confirm this behaviour… it does not work on private sites too - to include private site pages on to private site pages…
And I had of course problems with the included pages ( second level ) on this included pages from public sites ( handbook) .
CSI needs a specific design without self including other pages from it's own site with CSI …
This needs a re-structural work
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 ?
It could also lead to showing something completely different based on who visits the page.
Possibly. It would mean holding many versions of a page, since there are unlimited combinations (member of sites A and B but not C) in theory, though probably not in practice.
This is similar to the discussion of conditional blocks and hits the same challenges of caching.
I'll discuss it with Michal but IMO this is the wrong way of getting conditional content. I'd be happy that CSIs only work from public sites (if you make them private afterwards, it'll only take effect when you recompile the calling page), and fix the error message so it's clear.
Is it possible to pass data from within a CSI using ListPages? For example. I have pages made using data forms that I then post on the originating site using the ListPages Module. I can put that in say.. the sidebar locally using [[include pagename]] but when I try to call that from another site using a CSI I get nothing.
Example. I put the following code on my pbbg.wikidot.com on a page called sendit
[[div class="textdata"]]
[[module ListPages category="textdata" tags="" perPage="1" order="random" limit="1"]]
[[size 180%]]%%form_data{heading}%%][[/size]]
%%form_data{content}%%
[[/module]]
[[/div]]
[[module CSS]]
.textdata {
width: 180px;
height: 250px:
background-color: #acacac;
border-color: #707070;
border-style:solid;
border-width:5px;
padding: 5px;
text-align: center;
[[/module]]
Then on the target site I enter: [[include :pbbg:sendit]] but I all I get is the bit of css formatting with no content in the CSS box.
That means - the ListPages finds no page?
Normally the CSI works like a normal "incldue".
I cannot believe it…
I use all the hammer-navigation codes with CSI - they are all working most with ListPages..
1. Put the CSS in top of the code..
2. the tags="" are strange. !
3. on the target site there is a "textdata:_template" ? ( with data forms I assume? )
Can you show us the 2 pages?
(edit: it would help if you put a stand-alone "source" button om that pages.:
[[button source ]].)
Edit2:
http://pbbg.wikidot.com/sendit does not exist….
Edit3:
my favorite is the strange ( and unused !) tags="" ..!
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 ?
CSI's inject the target page's source into the calling page, not the compiled output of the calling page. That's why the CSS module portion works when injected into your page. What you're looking for is cross-site ListPages. I'm kind of surprised this hasn't come up before. All we would need is a site=site_name option for the ListPages selection criteria. As long as it used the same permissions as CSI, it should be secure enough.
The other option might be using the RSS output from ListPages. I haven't tested this, but it should work for what you're trying to do. The documentation on using the RSS options with ListPages lacks examples. I've found it easiest to create the RSS link and then copy the link that's generated into the Feed module and play with it until I get the results I want.
[[div class="textdata"]]
[[module ListPages category="textdata" tags="" perPage="1" order="random" limit="1" rss="csi-sidebar"]]
[[size 180%]]%%form_data{heading}%%][[/size]]
%%form_data{content}%%
[[/module]]
[[/div]]
(feed src may need editing)
[[module Feed src="http://pbbg.wikidot.com/feed/pages/pagename/sendit/category/textdata/order/random/limit/1/t/csi-sidebar" limit="1"]]
%%content%%
[[/module]]
What you're looking for is cross-site ListPages. I'm kind of surprised this hasn't come up before.
Actually, I've been dreaming about that for a while now :)
http://blog.wikidot.com/blog:cross-site-includes/comments/show#post-621720
:-) I guess I should have reviewed the old thread before putting my foot in my mouth!
Oha!
I understand now the wish!
He means like a feed the display of the dataform data of the "included" site !
Sorry, this is a real new ( old :) ) dreaming..
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 ?
Oh is this an old wish? I didn't realize, I'm a little behind in the wikidot curve. I recreated the examples posted above (sorry for the removal) to test it out but from what I understand from the posts above this is a no-go so I think I'll just have to use a version that does not use listpages. I did try the RSS feed version but I think in my case that option does not mesh well with what I'm trying to accomplish.