Tag multi select

23 views
Skip to first unread message

Константин Носов

unread,
May 15, 2012, 6:48:35 AM5/15/12
to vosao-cms-...@googlegroups.com
Hello. Could somebody help me with tag multiselec.
I need to show list of tags, and give visitor to chose some of them (for example tag1 & tag4)
After I shoul show list of pages that have both tags.
I found tag example on demo site, http://vosaocms.appspot.com/tags?tag=3870014 but I have no idea how to make it work with more than one tag.

mike uk

unread,
May 15, 2012, 12:39:03 PM5/15/12
to Vosao CMS Development
Hi,

I listed some handy un-documented vosao velocity template commands
here: http://staging.vosao.org/designer/doc/templates (I should have
moved them somewhere else)

I'm not sure I fully understand, but could you not select all
documents matching a tag into a collection, then select all docs
matching another tag into either the same collection or another
collection?

Regards

On May 15, 11:48 am, Константин Носов <nos...@gmail.com> wrote:
> Hello. Could somebody help me with tag multiselec.
> I need to show list of tags, and give visitor to chose some of them (for
> example tag1 & tag4)
> After I shoul show list of pages that have both tags.
> I found tag example on demo site,http://vosaocms.appspot.com/tags?tag=3870014but I have no idea how to make

Константин Носов

unread,
May 15, 2012, 1:13:04 PM5/15/12
to vosao-cms-...@googlegroups.com
You found great function!
$request.getParameter("count") - Access to parmeters in the HTTP
request eg "count"
using it I can pass tags via url.
There is a question how to pass variable list of tags using it...

Idea about two round filtering is good, but how can I create a collection?
$collection.add(tag)?
--
С уважением, Носов Константин
+38 (050) 553-54-24
http://nosovk.com

mike uk

unread,
May 16, 2012, 5:48:55 AM5/16/12
to Vosao CMS Development
I'm not really a velocity expert and it's been a while since I've done
anything with it but I can try and offer some guidance.

Velocity supports java collections under the covers and you can create
them on declaration for example:
#set( $monkey.Say = ["Not", "my", "fault"] )

lots of the vosao velocity objects return collections, for example:
#set($myCollection = $service.tag.getTags("/page/url"))

Velocity then supports commands that can be carried out on the
collections, for example sorting:
#foreach($obj in $sorter.sort($objects, "name"))
$obj.name = $obj.ordinal
#end

General purpose tools:
http://velocity.apache.org/tools/devel/generic/

VTL reference:
http://velocity.apache.org/engine/releases/velocity-1.6.4/vtl-reference-guide.html

VTL user guide:
http://velocity.apache.org/engine/devel/user-guide.html#variables

I hope that's of some help

On May 15, 6:13 pm, Константин Носов <nos...@gmail.com> wrote:
> You found great function!
> $request.getParameter("count") - Access to parmeters in the HTTP
> request eg "count"
> using it I can pass tags via url.
> There is a question how to pass variable list of tags using it...
>
> Idea about two round filtering is good, but how can I create a collection?
> $collection.add(tag)?
> --
> С уважением, Носов Константин
> +38 (050) 553-54-24http://nosovk.com
>
>
>
>
>
>
>
> On Tue, May 15, 2012 at 7:39 PM, mike uk <iain.ked...@gmail.com> wrote:
> > Hi,
>
> > I listed some handy un-documented vosao velocity template commands
> > here:http://staging.vosao.org/designer/doc/templates(I should have
> > moved them somewhere else)
>
> > I'm not sure I fully understand, but could you not select all
> > documents matching a tag into a collection, then select all docs
> > matching another tag into either the same collection or another
> > collection?
>
> > Regards
>
> > On May 15, 11:48 am, Константин Носов <nos...@gmail.com> wrote:
> >> Hello. Could somebody help me with tag multiselec.
> >> I need to show list of tags, and give visitor to chose some of them (for
> >> example tag1 & tag4)
> >> After I shoul show list of pages that have both tags.
> >> I found tag example on demo site,http://vosaocms.appspot.com/tags?tag=3870014butI have no idea how to make
Reply all
Reply to author
Forward
0 new messages