Company Directory - Dropdown selector ?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Company Directory - Dropdown selector ?

Post by naturelab »

I am building a site, where each page can be 'sponsored' by a local business.

ie: I want to say "This page, sponsred by this business" and have an easy way for a user to select and change the selection for the business.

The companies are set up using the Company Directory module.

I want to have a dropdown selector in the page admin area populated with each company name.

Is this possible ? Do I have to use CGContent Utils with a UDT to generate the dropdown ?

I have never used this module and am struggling to integrate anything into the *page admin area*



Any pointers ? Thankyou.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: Company Directory - Dropdown selector ?

Post by naturelab »

...from the lack of mention of this on the forums ( and believe me, I have trawled them extensively ), I am approaching this from COMPLETELY the wrong direction.

All I want to do, is associate a particular page, with a specific company entry.

Maybe I do this through the Company Directory admin panel ?

Any pointers ?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Company Directory - Dropdown selector ?

Post by velden »

I think using ECB or CG Content Utils combined with a UDT indeed is the way to go. But I don't know if it's easy to write that UDT. I never used the CD module myself.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: Company Directory - Dropdown selector ?

Post by naturelab »

OK, thanks for the reply.

Trying to do something like this :- ( UDT which gets Galleries from the Gallery module )

Code: Select all

if(!cms_utils::get_module('Gallery'))
return;
 
$galleries = Gallery_utils::GetGalleries();
$ret = array();
if($galleries){
foreach($galleries as $gallery){
$gpath = ltrim($gallery['filepath'] . $gallery['filename'], '/');
$ret[($gpath ? $gpath : $gallery['title'])] = $gpath ? $gpath : '/';
}
}
return $ret; 
Unfortunately, I can't find anythging suitable in class.cd_utils.php that will do a similar job ??? , but I will keep looking.
Post Reply

Return to “Modules/Add-Ons”