[Moin-user] Creating subpages in user's home pages

Yusuf Abdulghani yusuf at apple.com
Thu Feb 10 11:01:45 EST 2005


Hi Nir,

I got this to work this way: I created a HomepageTemplate as follows:

-------------------------------------
##language:en

'''Table of Contents'''
[[TableOfContents]]

= Welcome =
Your welcome message. Note that this is just a template. You can set it 
up however you want.

= Topics Related to This Page =
Here is an exhaustive list of sub-topics related to this page:

[[FullSearch(t:"^@PAGE@/")]]

= Contact Information =
Email:
Homepage:
Any other way to contact you: (if you wish to divulge that information 
;)

= Create New Topic =
  1. Think of a good WikiName for the topic. It will be used to create a 
subpage under this page. Enter it here:
   [[NewPage(BlankTemplate, Create New Sub-Topic, @PAGE@)]]

= How to Subscribe to This Page =
Realising that this page is subscribed by many users of this wiki, I 
want to explain how to subscribe to these pages correctly:

Just put `@PAGE@/.*` into the subscribed pages listing on the page 
UserPreferences.


----
CategoryHomepage

-------------------------------------

All users are instructed to create their pages based off of this 
template. When they create the page, the "NewPage" macro automatically 
detects the location of the @PAGE@ and creates the pages underneath the 
user's home page.

I think the other way that it would work is if I used the following on 
any page:

   [[NewPage(BlankTemplate, Create New Sub-Topic, @USERNAME@)]]


MoinExperts: Is this the right way to do it?

Thanks.

Best regards,

Yusuf


On Feb 10, 2005, at 3:17 AM, Nir Soffer wrote:

>> [[NewPage(SubpageTemplate, Create New Subpage in Homepage,
>> <USER_HOME_PAGE>)]]
>>
>> I want to allow the users to create a subpage under their HomePage
>> directory by clicking this NewPage button. I am wondering if there is 
>> a
>> way to do this? Note that <USER_HOME_PAGE> must be dynamically 
>> selected
>> based on the WikiName of the user who is logged in.
>
> NewPage macro can't do that, it work only with static page names. You 
> can clone this macro and write macro that does use the current user 
> name, accessible through request.user.name. Don't forget to share the 
> macro in MacroMarket after you write it :-).
>
> Best Regards,
>
> Nir Soffer
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real 
> users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user





More information about the Moin-user mailing list