Define new default content type ...

More
12 years 10 months ago #16757 by rleandro
How can i define a new default content type, other than the id=1 ?

By default when some article is stored in the JOS_CONTENT the first time you enter the articles section, you have to bind it, and it will be always binded to the default content type. I was wondering, if i could make the bind operation to classify the content type with id=2 ??

Best Regards,

Ricardo Leandro

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

More
12 years 10 months ago #16785 by ggppdk
I don't understand you mean that you create items by standard joomla article manager, and want them to bind not to the default item type?


-- 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 10 months ago #16796 by micker
he want to select an other type then article (id=1) automaticly

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.

More
12 years 10 months ago #16814 by ggppdk
I don't know if Emmannuel will include this in a future release, and don't know if it has any implications (i dont think it has,) and i believe it is useful.

The following code will make a select box appear so that you can choose on what type to bind the joomla articles:

You need to change 2 files:

1st file:
administrator/components/com_flexicontent/views/items/tmpl/default.php
LOCATE at ABOUT line 169
Code:
<input id="button-bind" type="submit" class="button" value="<?php echo JText::_( 'FLEXI_BIND' ); ?>" />

place the following code just before the <input id="button-bind" ... line
Code:
<?php $types = & $this->get( 'Typeslist' ); echo JText::_( 'Bind to' ). flexicontent_html::buildtypesselect($types, 'typeid', $typesselected, false, 'size="1"'); ?>

2nd file:
administrator/components/com_flexicontent/models/items.php
Replace 3 (three) lines (at about line 249):
Code:
$itemext = array(); foreach ($rows as $row) { $itemext = '('.(int)$row->id.', 1, '.$this->_db->Quote($lang).', '.$this->_db->Quote($row->title.' | '.flexicontent_html::striptagsandcut($row->text)).')';
with:
Code:
$itemext = array(); $typeid = JRequest::getVar('typeid',1); foreach ($rows as $row) { $itemext = '('.(int)$row->id.', '. $typeid .', '.$this->_db->Quote($lang).', '.$this->_db->Quote($row->title.' | '.flexicontent_html::striptagsandcut($row->text)).')';

Post back feedback, i have tested this and worked for me.

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 10 months ago #16856 by micker
great !

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.290 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