The focus of the upcoming 2.0 release has been security, and rightly so.
We've managed to slip in a few Web application changes along the way, but I
think the next release should probably concentrate on the Web application.
To that end, I've started some work that was knocking around in my head (a
scary place to be) about refactoring the DoPage method of
default.aspx.csinto a custom control. I've got to the point where I
can load a main topic
and the usual borders and navigate around the wiki using the Quicklink bar
and links in topics.
This changes Default.aspx to the following:
<%@ Page Language="c#" Codefile="default.aspx.cs"
AutoEventWireup="false" Inherits="FlexWiki.Web.Default2" %>
<%@ Register TagPrefix="flexwiki" Namespace="FlexWiki.Web"
Assembly="FlexWiki.Web" %>
<% StartPage(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
<%= GetTitle() %>
</title>
<%= InsertStylesheetReferences() %>
<%= DoHead() %>
</head>
<body onclick="javascript:BodyClick()" ondblclick="javascript:BodyDblClick()">
<flexwiki:TopicControl runat="server" id="TopBorder"
Topic="_NormalBorders.TopBorder" IsProperty="true" CssClass="Border"
/>
<flexwiki:TopicControl runat="server" id="LeftBorder"
Topic="_NormalBorders.LeftBorder" IsProperty="true" CssClass="Border"
/>
<flexwiki:TopicControl runat="server" id="TopicBody"
Topic="HomePage" IsMain="true" />
<flexwiki:TopicControl runat="server" id="RightBorder"
Topic="_NormalBorders.RightBorder" IsProperty="true" CssClass="Border"
/>
<flexwiki:TopicControl runat="server" id="BottomBorder"
Topic="_NormalBorders.BottomBorder" IsProperty="true"
CssClass="Border" />
</body>
</html>
<% EndPage(); %>
Properties
*Topic:* Defines the name of the topic to show by default.
*IsMain<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.IsMain&return=FlexWiki.FlexWikiUserControls>
:* Defines this
TopicControl<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.TopicControl&return=FlexWiki.FlexWikiUserControls>as
the one that displays the main content. Displays the content defined
by
the
TopicName<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.TopicName&return=FlexWiki.FlexWikiUserControls>property
first, but then uses whatever is in the query string.
*IsProperty<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.IsProperty&return=FlexWiki.FlexWikiUserControls>
:* Indicates that the
TopicName<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.TopicName&return=FlexWiki.FlexWikiUserControls>property
ends in the name of a property: <TopicName>.<PropertyName>. If
PropertyName<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.PropertyName&return=FlexWiki.FlexWikiUserControls>is
TopBorder<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.TopBorder&return=FlexWiki.FlexWikiUserControls>,
LeftBorder<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.LeftBorder&return=FlexWiki.FlexWikiUserControls>,
RightBorder<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.RightBorder&return=FlexWiki.FlexWikiUserControls>,
or
BottomBorder<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.BottomBorder&return=FlexWiki.FlexWikiUserControls>,
then it is treated as the normal border properties (i.e.
WikiText<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.WikiText&return=FlexWiki.FlexWikiUserControls>),
otherwise it is treated as normal
WikiText<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.WikiText&return=FlexWiki.FlexWikiUserControls>(which
can include
WikiTalk<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.WikiTalk&return=FlexWiki.FlexWikiUserControls>
).
*PropertyIndex<http://localhost/FlexWiki/wikiedit.aspx?topic=FlexWiki.PropertyIndex&return=FlexWiki.FlexWikiUserControls>
:* The index of the property on the page if more than one property exists in
the topic of the same name.
No output (not even the containing div) are generated if the specified topic
or property is empty.
Issues
1. Content served from _NormalBorders (e.g. _NormalBorders.LeftBorder)
is generated in the context of that topic, rather than the main topic.
2. Topic rendering doesn't take into account diffs, restore, or
redirecting to edit for non-existent topics.
I'm putting this out there for people to think about and consider, but it *WILL
NOT* be included in the upcoming FW 2.0 release. You can get the current
version of this code from
https://flexwiki.svn.sourceforge.net/svnroot/flexwiki/flexwikicore/branches/scratch/derek-lakin
Thanks,
Derek.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Flexwiki-users mailing list
Flexwiki-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexwiki-users