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

I agree with Nathan - you do not want flash in your HTML email. You can have the HTML email look like the start of a movie.. or whatever graphics you want in there.. but when clicked - the user should be taken to a web site where a full web browse...
11 hours ago
Todd Sanders from the University of Wisconsin - Green Bay, provides this job description.
13 hours ago
Rick Hill joined DNI's group
For folks who use (or are interested in) Hannon Hill's Cascade Server CMS product
21 hours ago
How are you looking to point users to the Flash file? I don't know the most recent stats on Flash visibility through email clients but I remember in the past the argument was against sending a pure Flash file through email. Instead the suggestion ...
yesterday
We recently tested Joomla vs. Drupal and arrived at some of the same conclusions as previous posters. In the end, with as large as we need the site to be, we settled on Drupal. It has yet to be seen if we've made the right decision. I'll get back ...
yesterday
It's not for our school, but it is a pretty decent description of a social media intern position: https://jobs.scottrade.com/viewjob.html?optlink-view=view-12523&ERFormID=newjoblist&ERFormCode=any
yesterday
Heather Jackson added a discussion
We're planning on sending out a Flash-based Christrmas greeting via email. I'm wondering what maximum file size we should be aiming for. (i.e.
yesterday
We're working on this with a school right now. I'll share what we end up at!
yesterday
If you plan to attend the 2009 Symposium for Marketing of Higher Education being hosted next week by the American Marketing Association in Boston, please stop by and hear Lance Merker, CEO of OmniUpdate, discuss student expectations about the coll...
yesterday
Here was mine (with a hearty assist from Jessica Krywosa of Suffolk University): This position will allow a student the opportunity to help shape and promote online and social media community experiences for the college. The social media intern s...
yesterday
I do all 'main university' type postings in FB and Twitter and act as the 'voice' of the accounts adding personal touches here and there, such as personal questions or greetings. Our strategy includes adding admins from various parts of the unive...
yesterday
Jessica is beat from the Stamats conference!
yesterday
I dont know if its served me well - its only been a few months - but I have only a short descriptive 'graph that I used. This position allows a student the ability to help promote and shape the university online community experience. By providing...
yesterday
Tish, Eloine and Maggie Corbin joined University Web Developers
yesterday
As I review admissions pages and applications, I've discovered there are few admissions pages that have an easy to find call to action to apply. The norm seems to be scanning a lot of text to find the "to apply" choice.
yesterday
John, Not sure if you've seen this already, but check out Common Admissions Application. Looks like a number of higher ed schools across the country use it.
yesterday
Justin, just got through with an OmniUpdate CMS demo. The application is unbelievable. It is awesome. If we had the money we would right the check right there. What is cool about the company is they are trying to work with us. I think that this sp...
on Friday
Sam, beside Joomla I have used DotNetNuke also and I have experienced the same type of issues with DNN. Installation. I have had huge issues and a lot of wasted time trying to install DNN and trying to get it up and running. Once I have it install...
on Friday
Darren Ladner added a discussion
I need a new calender of events type software. Right now we were using the open source vtcalender system until it broke. This system has been nothing but problems. The previous web designers were the ones that put this calender system into use. Wh...
on Friday
I sent them an email looking for a baseline cost but have not heard back from them yet. We are currently debating whether or not this is an in-house project. Though I'm more prone to go with the vendor if they offer extensibility we don't have t...
on Thursday

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

Terry Calhoun Terry Calhoun created this social network on Ning.

© 2009   Created by Terry Calhoun

Badges  |  Report an Issue  |  Privacy  |  Terms of Service

Sign in to chat!