153 Posts
Hableur
8 years ago
9
Topic

Hello,

it's probably a stupid question, but I'm searchning for a moment, and I don't find how to change the type of an article.

So, I have 2 types of articles (type1, type2), defined in form & content type, and I just want to change the type of one article from type 1 (default type) to type 2.

Thanks for your help.

Get a Book for SEBLOD
57 Posts
KKAAZZOO
8 years ago
1
Level 1

Plugin "Link"

153 Posts
Hableur
8 years ago
0
Level 2

Thanks KKAAZZOO, but I don't find any interface in article editor to change the type of the article. Where have you find yourth ?

The article (type 1) is existing and I want it to be in type2.

178 Posts
Jeka
8 years ago
1
Level 1

Hi. As i know it`s not possible to just change Content Type of some item. As KKAAZZOO mentioned above you can open your item through other form ( content type ), but even if you save your item through other form, im not sure that it will be assigned to another content type.

153 Posts
Hableur
8 years ago
0
Level 2

Ouch ! Thanks for the response.

I would replace flexicontent with seblod in an existing site, but if it's not possible to make a so basic operation, the seblod solution lose interest :(.

It's best I know that before, thanks. 

178 Posts
Jeka
8 years ago
4
Level 1

Do not rush make conclusions. Maybe it's possible, let someone from the more advanced users will clarify this

153 Posts
Hableur
8 years ago
3
Level 2

Maybe...

153 Posts
Hableur
8 years ago
2
Level 3

About my researchs :

- Type of content for an article  is saved in #_cck_core, type in cck field and id of article in pk. 

- List of type is in #_cck_core_types. So it's possible to make a dynamic select field in a form with a sql request (select title, name WHERE storage_location='joomla_article' for exemple).

But writing the choice in #_cck_core doesn't work.

An idea ?

153 Posts
Hableur
8 years ago
1
Level 4

So strange nobody finds interest in this subject :(...

I find something that seems to work.

1. Creating a dynamic field name 'type_darticle' with #__ckk_core_types as table, options name = title, options values = name, where = storage_location='joomla_article', stockage standard, article, type_darticle

2. Creating a php field before save with $config[type]=$fields[type_darticle]->value;

My problem is now to have the value of 'cck' field from #_cck_core as checked value... 

153 Posts
Hableur
8 years ago
0
Level 5

Well, for having the cck field from #_cck_core as checked value in the dynamic field to choose type, I try to fix dynamic value of this field with URL variable type (because it's the same value). It's working when I make a new article (if I choose new article type 1, the URL is index.php?option=com_cck&view=form&type=type1&return_o=content, and value on my dynamic selection is Type 1).

But, it doesn't work when I edit an existing article (the URL is index.php?option=com_cck&view=form&return_o=content&type=type1&id=1188) but variable type isn't read.


Why the same field is able to take the variable value when form is editing for a new content, and not when it's an existing content ? It's crazy !


Get a Book for SEBLOD