I am using the CMSMS1.1.1 version.
Just finish a project for a client and now he will enter his portfolio into the site.
I installed the module Catalog to publish the portfolio.
My doubt: is there a way do define a Default Content Type like we define a default template? Then I can define Cataloger Item as the default Content Type to optimize the work of my client. I even tryed something like the following example, without success:
http://www.mysite.com/admin/addcontent. ... atalogitem
Any idea? May be hard coded?
Aleph Ozuas
www.ciberarte.com.br
www.dzo.com.br
Default Content Type [solved]
Default Content Type [solved]
Last edited by aozuas on Thu Sep 06, 2007 9:24 pm, edited 1 time in total.
Re: Default Content Type
You might want to try editing "addcontent.php", somewhere down there is:
Ronny
Where the red-part is the default (my guess!!) I couldn't see quickly where the "(isset($_POST["content_type"]))" gets its value!#Get current userid and make sure they have permission to add something
$access = (check_permission($userid, 'Add Pages') || check_permission($userid, 'Modify Page Structure'));
#Get a list of content types and pick a default if necessary
global $gCms;
$contentops =& $gCms->GetContentOperations();
$existingtypes = $contentops->ListContentTypes();
$content_type = "";
if (isset($_POST["content_type"]))
{
$content_type = $_POST["content_type"];
}
else
{
if (isset($existingtypes) && count($existingtypes) > 0)
{
$content_type = 'content';
}
else
{
$error = "No content types loaded!";
}
}
Ronny
Last edited by RonnyK on Wed Sep 05, 2007 8:12 pm, edited 1 time in total.
Re: Default Content Type
RonnyK, you are the man! Worked wonderfully, thank you!
I just change that line:
for that one:
Aleph Ozuas
www.ciberarte.com.br
www.dzo.com.br
I just change that line:
Code: Select all
$content_type = 'content';
Code: Select all
$content_type = 'catalogitem';
www.ciberarte.com.br
www.dzo.com.br
Re: Default Content Type
Aleph,
if this topic is solved, will you mark the subject of the first post to [solved], by modifying the first post.
Be aware that upgrades, will overwrite your changed code. So in case of an upgrade, you have to redo the editing of the code.
Ronny
if this topic is solved, will you mark the subject of the first post to [solved], by modifying the first post.
Be aware that upgrades, will overwrite your changed code. So in case of an upgrade, you have to redo the editing of the code.
Ronny