How to create new content type in Openpublish

Events happening in the community are now at Drupal community events on www.drupal.org.
neerajskydiver's picture

I am trying to create new content type in Openpublish - Project. I need to add few additional fields (using CCK) and display in Tag Group.

Duplicated following file -
/sites/all/themes/openpublish_theme/node
node-article.tpl.php as node-projects.tpl.php

/sites/all/modules/openpublish_core/theme_helpers
node-article.tpl.inc as node-projects.tpl.inc

Now when i go to home page after clear the cache, getting blank page.

and new project content created doesn't give display as article does.

Please help, if i am missing something.

Comments

did you just duplicate it or

resveld's picture

did you just duplicate it or did you change the files as well?
You will need to adjust the view as well that is accompanied with the article view

i just duplicated it

neerajskydiver's picture

Thank you resveld for quick help.

I just duplicated it. Not sure of what changes has to be made inside the file except adding up additional field variable.

added following variables -

$vars['field_extra_info_updates_value'] = $vars['field_extra_info_updates'][0]['value'];
$vars['field_components_value'] = $vars['field_components'][0]['value'];
$vars['field_relevant_website_value'] = $vars['field_relevant_website'][0]['value'];
$vars['field_free_downloads_value'] = $vars['field_free_downloads'][0]['value'];
$vars['field_related_content_value'] = $vars['field_related_content'][0]['value'];

I have cloned article view as projects view. Project listing page is working properly as in Articles. Issue is while displaying full node. Project node view is not as Article node view. These fields are not coming in Group Tabs.

I am trying to create tabs like this - http://www.elektor.com/magazines/2010/december/led-the-sun-shine.1602130...

This is where i am trying to recreate using OP - http://el1.elektor.co.in/project/co2-measurement

i checked the page source code. In fact these values are coming but not visible.

Appreciate your help.


Neeraj
Valuebound, Drupal development

did you edit

resveld's picture

did you edit node-project.tpl.php and added

<?php
print $field_free_downloads_value
?>
for example?

Do NOT alter

irakli's picture

Do NOT alter sites/all/modules/openpublish_core. You do not need that to add a new content type and modifying third-party module (esp. OP core module) is a very bad idea, which will break your update in the future.

.............................................
http://twitter.com/inadarei

What if we add additional files in OP core

neerajskydiver's picture

I am trying to add a new content type and would like to create as in OP. What i have done is added additional files in themes as well as theme_helper folder. e.g. for paid events created node-paidevent.tpl.inc & node-paidevent.tpl.php. Will this be issue in future? I am not able to find any documentation to create new content type as it is created in OP. Can you please help? Thank you.


Neeraj
Valuebound, Drupal development

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: