Item Submit Form - Category Selection List

More
12 years 8 months ago #17884 by Brat
Hello again. I'm almost done with the front-end part of my project. However, I want to redo the category selection list in the front-end form. To do this, I really have only two options - either hack the actual code that generates the selection list, or somehow override this in form.php

Could you please tell me what Flexicontent file generates this code?

In lieu of that (as I really hate hacking core code for many reasons), is there a way I can override this somehow with code in the actual form.php file?

And just as an FYI - the main issue with the way the category selection list is laid out in the frontend is that there is no easy way for me to get jQuery to hook into it. If the category/subcategories were generated using nested unordered lists instead, jQuery plugins could readily take care of pretty much everything I need (i.e., alphabetizing, layout, etc.).

Thanks again! 8-)

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #17885 by ggppdk
You can create a template override for the flexicontent items view, for tmpl file form.php ...

Create folder
'templates/mytemplate/html/com_flexicontent/items/'

inside the above folder copy file:
'components/com_flexicontent/view/items/tmpl/form.php'

Edit and customize the file.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #17887 by Brat
Great!

I realize that there is recursion used to build the selection list. By the time the list hits the form, it looks like it is already fully formatted (I did a print_r to look at the construct). Where is the code I would need to generate the category list? Thanks again!

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #17889 by ggppdk
You are in luck, the code you want is exactly at the start of the form.php
Code:
// Added to allow the user to choose some of the pre-selected categories $cid = $this->params->get("cid"); $postcats = $this->params->get("postcats", 0); if ($cid) : ... ... endif;

The variable $cid is string of comma separated allowed categories ids, and $globalcats contains all categories.

Just print_r these variables and also alter the existing code inside if ($cid) : ... endif to achieve what you need.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #17891 by micker
Great thanks

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.268 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline