Page 1 of 1

[SOLVED] Custom dropdown when editing

Posted: Wed Jul 27, 2011 2:14 pm
by vinc
Hi there,

This is more a discussion than a question but if you can provide me some useful informations, i'll be happy to hear from you :)

I want to display the "classic" content block and another dynamic one with the cgblog entries on my website.

For now i'm using the classic content which is for static text (like any normal page)

Code: Select all

{content}

and another one on the same template...

Code: Select all

{content assign="category" block="blog" label="Blog Category" wysiwyg="false" oneline="true"}
...to provide a blog category to display on the same page with

Code: Select all

{CGBlog category=$category}
The editors can enter the static text in the classic content and they must enter the exact name of a blog category in the second one.

My goal is to provide the same functionnalities but without typing the exact category name (we have some strange names here that are not very usefull to enter by hand).

I thought about creating a template for each category to display, but this is not really good when updating the base template. Also the categories are subject to change and i don't want to create a new template each time...

I wish to implement a custom dropdown to list the available categories of cgblog.

I think this is a core feature and i need your reflexion about it.

Thank you for your patience reading me.
If you need some more informations, i'll be happy to provide some :)

Regards,

Vincent

Re: Custom dropdown when editing

Posted: Wed Jul 27, 2011 2:16 pm
by calguy1000
See CGContentUtils ... it allows creating dropdown content block types.

Re: Custom dropdown when editing

Posted: Wed Jul 27, 2011 3:47 pm
by vinc
Ok thanks Calguy :)

This is better ! but... I have to update the dropdown values....

Is there a way to get the values of the existing cgblog categories ?

Re: Custom dropdown when editing

Posted: Wed Jul 27, 2011 4:10 pm
by calguy1000
No, currently there is not. There would need to be a modification to the CGBlog module to add a custom block type. Not that difficult, just hasn't been done yet.