Thank you for your answer.

Oh, but I do want the wiki behaviour, not just a widget. I just want
the wiki behavior without throwing away the common web2py development
flow with my model, my controllers and possible specific views.

Consider this,
Let's say I make a request to .../whatever/mypage with possible
request.args to load a wiki page.

1) Couldn't I trap this request into a common controller (i.e.
controllers/mypage ) that could retrieve things from the database and
return them (i.e. items list) to a wiki page by wrapping things into
plugin_wiki/mypage so that I could edit it in a wiki style?

Inside the page body I could do things like:
``
{{for item in items:}}
{{=item.title}}<br/>
{{=item.body}}
{{pass}}
``:template

if there was no controller to handle mypage, it would load plugin_wiki/
mypage normally just as it would to any wiki page, with no extra
processing.

2) The same idea could be applied to Views.
if there was no specific view, the generic view would be called (i.e.
views/plugin_wiki/page.html ). if there was a file views/mypage.html,
it could be processed as a specific view. Again, all the plugin_wiki
advantages with no loss of functionality.

Other option for this could be 1) + the possibility to make in the
controller: response.view = my_view.html

3) All remaining the plugin_wiki behavior would remain untouched

Thank you
Best regards

On Dec 2, 7:27 pm, mdipierro <[email protected]> wrote:
> But you can do
>
> def index():
>     return dict(comments=plugin_wiki.widget('comments'))
>
> {{extend 'layout.html'}}
> {{='bla '*100}}
> {{=comments}}
>
> what is wrong with this?
>
> On Dec 2, 9:27 am, blackthorne <[email protected]> wrote:
>
>
>
> > Sorry to rehash this topic. It's that important to me.
>
> > What I really want is the plugin_wiki functionality but without
> > compromising the MVC way of making things with web2py. I wanted to be
> > able to create some pages with the plugin_wiki in a way that allowed
> > me to plug a normal controller and a specific view into it.
>
> > Currently, the closest thing I found to it is to use the load_url
> > widget and I can only define generic views.
>
> > Thank you,
> > Best regards
>
> > On Nov 30, 11:50 pm, blackthorne <[email protected]> wrote:
>
> > > hi
>
> > > 1.
> > > with the table new like this:
> > > db.define_table('new',
> > >         SQLField('photo_id', 'string'),
> > >         SQLField('name', 'string', notnull=True, length=16,
> > > requires=IS_NOT_EMPTY()),
> > >         SQLField('created', 'datetime',
> > > notnull=True,default=datetime.datetime.now(),requires=IS_DATETIME()),
> > >         SQLField('created_by', 'string'),
> > >         SQLField('tag', 'string'),
> > >         SQLField('link', 'string', length=80, default=None,
> > > requires=IS_URL()),
> > >         SQLField('type', 'string', notnull=True, length=16, 
> > > default=types[0],
> > > requires=IS_IN_SET(types)),
> > >         SQLField('slug', 'string', length=32, default=''),
> > >         SQLField('description', 'text', notnull=True,length=64,
> > > requires=IS_NOT_EMPTY())
> > > )
>
> > > Using plugin_wiki, I can't use the "read" widget. Other widgets like
> > > jqgrid work fine.
>
> > > 2. How can I access my app model from the plugin_wiki?
>
> > > 3. how should I map a controller to a plugin_wiki page?
>
> > > Thank you
> > > Best regards

Reply via email to