University Web Developers

University Web Developers

I was recently upgraded to the Enterprise Edition and was excited to begin using the widgets I had heard so much about, e.g., news pulls, photo galleries, etc. EXCEPT, there are zero pre-built widgets to dissect and figure out how to build a new one. Cue Game show loser sound effect... "WAAAH wahhh waaaaahhhh"

I get that they begin with structures, but what I don't get is how to make the variables as part of the structure and how, in the end, those would get pulled into the widget.

Here's what I'm thinking would be the end result. User wants to make a photo gallery. Adds "Widget-Photo Gallery" to their container. A pop-up window asks them to browse for a folder and voila! Photo Gallery.

If you choose to reply, Fienen and/or Falzone, type slowly so I can understand. :)

Tags: widget

Share

Reply to This

Replies to This Discussion

I am working on this exact same puzzle right now. So the answer has and audience of at least two. :)

Reply to This

I love how you call out Chris and me specifically on this, heh.

Widgets are crazy easy. I actually just finished up on one for departments to use to pull in custom listing of news from PR based on categories. It took less than an hour to set up.

If you are familiar with writing dynamic Velocity code, you pretty much won't have an issue. Let's use your case of a photo gallery (and we'll assume you're gonna use the built in gallery macro).

Create a structure with a type of widget, and call it something like "Photo Gallery." Add a text field called "Gallery Path." That's where they can put in the folder name with their pictures. Now, edit the Widget Code field, and you'll do something like this:

<h2>$widgetTitle</h2>
#photoGallery("$galleryPath")

Bam, you're done, instant widget. Now, you could start taking it further, like add fields for photo height and photo width, then set them in the widget code. That's what I usually do. When I use a widget to serve as a UI for a macro, I'll add a section at the bottom with all the optional elements you can set, and in the widget code, I see if those have been entered, and if so, add a #set() line for that macro variable.

There's also some info in the docs about how to set it up that'd probably be helpful: http://www.dotcms.org/documentation/widgets If you want some real time help, come by the IRC channel (http://www.dotcms.org/community/irc.dot) or catch me on IM or Twitter.

Reply to This

Hah, there's my name. Michael's answer is great so I won't go much farther than saying that there should be some simple examples like this in starter site. I thought there were some, but if not, then hopefully the DotCMS guys are listening and they'll put some in. You could also stop by their JIRA and put in a request: http://jira.dotmarketing.net

Reply to This

I think I've pretty much got it.

1. Create Structure - Make sure it is a widget structure type.
2. Add Custom Field
3. Learn Velocity
4. Insert Velocity and lucene query into Widget Code field
5. Have users add widget to pages and watch your site blossom.

I'm still a little stuck on #3.

Reply to This

yep. #3 is a doozy.

Reply to This

So yeah, velocity is a strange animal, but as far as programming goes .. it really is not that hard.

The main concepts you need to know are
#set - sets a variable
#if ... #else ... #end - for conditionals
#foreach ... #end - for looping

Macros -- Macros are like a chuck of code that just gets executed. They cannot return a value, but they can #set a variable.

Viewtools -- Java Objects. Velocity is Java under the hood so for the most part .. whatever you can do in Java you can do in velocity.

That is really all there is too it.

1. Check out the user guide: http://velocity.apache.org/engine/devel/user-guide.html
2. TRY it .. you're never going to learn velocity unless you get your hands dirty
3. If you can't figure something out .. join us on the irc channel .. #dotcms on freenode.

Good luck :)

Reply to This

actually... I just did it in about 2 minutes. Easy. The basic bit anyway. Now I realize that I need to create some pretty css to make the gallery not look meh.

Reply to This

RSS

Elsewhere

Latest Activity

We've been exploring SocialEngine for the last few weeks and just made the purchase this morning. It has "subnetworks" within your installation, which I believe will help you keep folks separate and achieve what you're looking for. We bought one lic…
29 minutes ago
34 minutes ago
Michael Fienen added a discussion
Hey everyone, just wanted to toss out some shameless self promotion. My .eduGuru blog posting about the #heweb09 Great Keynote Meltdown of 2009 was nominated for the Edublog Most Influential Blog Post of 2009. We'd love it if you'd take a second and…
1 hour ago
Couple more- from my alma mater- Keene State College - This year's card from Providence College - I'd love to see what else everyone is doing if you care to share... Happy Holidays! -Dan Web Developer Providence College ddemmons@providence.edu
2 hours ago
Same story at SUNY-ESF -- Ning network for accepteds rolled out 1/08 with a plan to 'retire' it, well, now actually, and then to relaunch for the next class. The network had student ambassador and admissions staff members, and it included dedicated…
2 hours ago
stephen mosley, Mali Sauntry, Larry Hackman and 3 more joined University Web Developers
13 hours ago
Groundswell is great
16 hours ago
Heather Jackson added a discussion to the group Canadians
Hi Fellow Canadians, I'm looking for recommendations on email marketing providers that are based (or at least their server is based) in Canada. I've been using MailChimp out of the US, and it's great, but because of BC's privacy law I can only gath…
16 hours ago
Jeff added a discussion
Hi all, We are looking into a tool, software or vendor that could help us develop an online student orientation. Which would include video and flash elements. We recently reviewed Comevo and was wondering if anyone knows of other companies/vendors t…
18 hours ago
Doug Thompson added a discussion
This company (http://www.universityparent.com/edu) was mentioned at a meeting today, and I was wondering if anyone had any insights as to whether this sort of thing is commonplace, practical, useful, etc. Thanks in advance for any info, Doug Thomp…
18 hours ago
This group is for anyone interested in how to use Ning
20 hours ago
I work in the Marketing & Public Relations department. We started our first college Facebook page. We call it the official college page. Other departments have Facebook pages, such as the Library, eLearning, Student Services, etc. All Facebook pages…
20 hours ago
Thank you, everyone for your replies. The powers that be are asking us to test a new program called "Socialtivity" created by a local developing company. I'll let ya'll know how it plays out.
21 hours ago
Kristin Greenberg added a group
Group for users of ActiveAdmissions CMS
21 hours ago
OmniUpdate has completed end-user OU Campus CMS training for Sullivan County Community College – State University of New York. We anticipate great results from this great group of people, and look forward to working with them in 2010!
21 hours ago
Have you looked at http://www.thindata.com/ and http://www.campaignmonitor.com? Not sure if they offer everything that you are looking for but their emails are well designed in my opinion.
yesterday
annalisa added a discussion
Anyone have any recommendations for books/papers on Social Media and/or "Web 2.0" Thanks very much, Annalisa
yesterday
RhondaK and Maya Chanthaphavong joined University Web Developers
yesterday
yesterday
The new State College of Florida, Manatee-Sarasota, website looks great and was quickly launched using OmniUpdate’s OU Campus web CMS.
yesterday

An adjunct to UWEBD. UWEBD has been in existence for more than 10 years and is the very best email discussion list on the Internet, in any industry, on any topic.

About

© 2009   Created by Mark Greenfield

Badges  |  Report an Issue  |  Privacy  |  Terms of Service

Sign in to chat!