purplecat: Hand Drawn picture of a Toy Cat (Default)
[personal profile] purplecat
I'm trying to integrate setting a post as a sticky, and multiple stickies into the new entry form.

I've got the form set up to return whether the post should be a sticky and if so which sticky as a value for "sticky_select",

So in DW::Controller::Entry.pm in the function _decode, the value I want comes in as $post->{sticky_select}

That bit works fine.

But I then want to record the value in $req->{props} in order that it can be passed on to _do_post sensibly and the post set as the correct sticky at that point.

If I attempt to put in


$props->{sticky_select} = $post->{sticky_select};


or


$props->{"sticky_select"} = $post->{sticky_select};


or similar I get the error message

Client error: Unknown metadata: sticky_select

So my question is "How do I define metadata?" for use in this object.
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
[personal profile] pauamma
Is there a Wiki page (or something) on using jQuery on DW? I'm confused on what the group option to need_res is for vs. set_active_resource_group. And I need that info so I can update the TTization page (http://wiki.dwscoalition.org/notes/Routing_and_Template_Toolkit)
anarres: (Default)
[personal profile] anarres
I thought this might be useful for anyone who's as baffled by Template Toolkit as I am ;-)

First off, I just wanted to get something, anything, to work, so I would be able to play with it. It turns out there are a few different ways to use Template Toolkit, and Dreamwidth uses it via the Perl Template module. I installed this module on my laptop by doing this:

$ sudo cpan Template

Then following this tutorial: Devshed: getting started with the Perl Template Toolkit, I put the following two files in the same directory:

destruction.tt:

People of [% planet %], your attention please.

This is [% captain %] of the Galactic Hyperspace Planning Council.

As you will no doubt be aware, the plans for development of the outlying regions of the Galaxy require the building of a hyperspatial express route through your star system, and regrettably your planet is one of those scheduled for destruction.

The process will take slightly less than [% time %].
Thank you.

Read more... )
foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
[personal profile] foxfirefey
I've recently written a guide on Routing and Template Toolkit, which is the system that's going to be replacing BML. As is, the guide is probably only suitable for people who already know their way around the code fairly well, but it's a start to understanding the system if that's what you're interested in.

If you have questions, ask them here, so we can determine if they have answers that should be added to the guide or need solutions developed.

Learning this is especially relevant if you're doing anything that involves significantly revamping a given page, or creating a new page! It'd be better if it could be translated to this system instead of being done in BML.

Profile

dw_dev_training: The stylised 'd', with the word 'dev' above, and the word 'training' at the side, representing the dw_dev_training comm. (Default)
Dreamwidth Development Training

September 2022

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
252627282930 

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 29th, 2025 09:02 pm
Powered by Dreamwidth Studios