Display lengthy legalese/explanation static text in CCK

in

Often there is a need to make some big block of text in the middle of a CCK input form. And on node display, show that same text and the value of the text field. Something like this:

An important requirement is your site admin (often your non-technical client) can edit the text. Any sort of CCK form widget require permission and change to the form. Not easy for plain user.

But CCK fields just don't have any way to include lengthy text. They can have help text which are displayed below the input in gray text. The second problem is I need this text to be shown when the page is displayed but the various modules I found (markup, form_markup) do not show anything on output. So I created the nodeincck module to solve this need.

It fetches another node and displays it both in the node edit form and node output. The markup and form_markup modules on output will be like this:

but nodeincck output is like this:

The main reason to use another node is for ease of site maintenance and flexibility: to change those text, just edit that node. Also the full power of Drupal's node system is used to 1) have any kind of fields and 2) complete theming capability.

About themeing: when a node is displayed in this context, it should, in almost all cases, hide the field label, all the links, submitted, taxonomy etc and just display the title and body. For this, the module makes several template suggestions to override the node template, in order of general to specific:

  1. node-nodeincck.tpl.php
  2. node-nodeincck-<FIELD_NAME>.tpl.php
  3. node-nodeincck-<NODE_TYPE>.tpl.php
  4. node-nodeincck-<FIELD_NAME>-<NODE_TYPE>.tpl.php

For example, I use this as my node-nodeincck.tpl.php:

<div id="node-<?php print $node->nid; ?>" class="node-nodeincck"><div class="node-inner">

  <?php if (!$page): ?>
    <p class="node-nodeincck-title">
      <?php print $title; ?>
    </p>
  <?php endif; ?>

  <div class="node-nodeincck-content">
    <?php print $content; ?>
  </div>

</div></div> <!-- /node-inner, /node -->

this leaves out all the extra stuffs normally displayed in a node and only show the title inside paragraph tag and body.

Any way to have different nodes per organic group?

Chad's picture

This may be a trick, but it would potentially have wide applications. Let's say we have different groups and they all have different agreements based on each group. I would like to have the same content type used by each group, but have a different node included in that content type, depending on the group. Does that make sense? This could be useful for groups with different agreements, but in my case, I want each group to have a mission statement that is inserted into every content type created-- but again the particular node that is inserted should be dependent on the group creating the content. This is the closest to that functionality that I have found. Thank you for any response.

Seems like you want to have some logic to determine...

Alpha Epsilon Delta's picture

...which node to show base on some variable, in your case the group id. I can add a PHP mode where instead of the node id, it's some PHP snippet that returns the node id, something like this:

instead of

---> 34 <----

to show node 34

you enter:


switch $user->group {
case 1:
return 737;
case 2:
return 747;
default:
return 777;
}

and you check the PHP check box.

would that be the way?

Very good post, thanks a lot.

dido's picture

Very good post, thanks a lot.

.

Friend's picture

Große Blog, danken

Really good trick! Thansk

Provigil's picture

Really good trick! Thansk dude! But why are you using return 777 here?

Really good trick! Thansk

Provigil's picture

Really good trick! Thansk dude! But why are you using return 777 here?

Really good trick! Thansk

Provigil's picture

Really good trick! Thansk dude! But why are you using return 777 here?

I think the use of multiple

patent infringement's picture

I think the use of multiple nodes makes sense. In particular, due to the seriousness of legal contract language, it is imperative that, if working for clients, everything is in proper order. After all, the digital sphere as well the physical world has it's share of people looking to take advantage of others who are not protecting their assets to the fullest. Thus, having a safety net, such as a written contract or disclosure form could be advantageous in the event of a legal/property rights battle.

marvelous source of info...

Phone Lookup's picture

I visited this page first time and found it Very Good Job of acknowledgment and a marvelous source of info.........Thanks Admin!

marvelous source of info...

Phone Lookup's picture

I visited this page first time and found it Very Good Job of acknowledgment and a marvelous source of info.........Thanks Admin!

Your blog is so rich with

Find Name By Phone Number's picture

Your blog is so rich with nice content.I think you have done a great job with your blogs.Why don't you add a translator so that people from other countries can read this awesome blog of yours.

having a safety net, such as

allopurinol side effects's picture

having a safety net, such as a written contract or disclosure form could be advantageous in the event of a legal/property rights battle.

having a safety net, such as

what is citalopram's picture

having a safety net, such as a written contract or disclosure form could be advantageous in the event of a legal/property rights battle

I think you have done a great

paroxetine dosage's picture

I think you have done a great job with your blogs.Why don't you add a translator so that people from other countries can read this awesome blog of yours.

I am quite excited that I

actos side effects's picture

I am quite excited that I came across this website. I did not find out any other informative site on this subject matter prior to visiting your site. This is one of the best websites I have ever come across. I hope you never stop writing informative articles.

Valuable information I found,

Grants for Veterans's picture

Valuable information I found, the information that you provided is excellent post and a good job. It is my great pleasure to visit your website and to enjoy your excellent post.

CCK

Skip Hire Norwich's picture

I've noted it many a times here that you talk a lot about CCK. But it is still not cleared to me yet what does it actually means?

Nicely written blog

free cell phone spy's picture

You put really very interesting details. This is the best site for anyone who wants to know about this matter. You definitely put a new rewrite on a topic that's been published about for a long time.

You put really very

free cell phone spy's picture

You put really very interesting details. This is the best site for anyone who wants to know about this matter. You definitely put a new rewrite on a topic that's been published about for a long time.

Good Work !

Insulina's picture

Good Work ! thanks for sharing!

I loved the post a lot. This

Cable Tray Forming Machine's picture

I loved the post a lot. This is really great blog, I always find worth reading stuff here. Thanks to writer.

I ran across many fascinating

does nono really work's picture

I ran across many fascinating points of view at this particular webpage. The site was basically highly important for me personally. I've got to gain knowledge every single day.

file

Top Business Hosting's picture

I ran across many fascinating points of view at this particular webpage. The site was basically highly important for me personally. I've got to gain knowledge every single day.Top Business Hosting

This article is something

Buy Twitter Followers's picture

This article is something that will help me with my class assignment. It helped me to better understand another aspect of this topic. Thanks.

Sometimes it is very hard to

Buy Twitter Followers's picture

Sometimes it is very hard to find good content on this topic. But your blog is my way to desired information, my problem is solved now.Thanks for posting something worth reading.

A good blog always comes-up

special education Teacher salary's picture

A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a good one.

I really liked your blog

purchase facebook likes's picture

I really liked your blog quite informative and interesting facts and figures you have discussed on your blog even the comments are very fruitful and helpful in enhancing the knowledge regarding the topic

Written Will

Blog Commenting's picture

A written will that has been seen by a lawyer and other parties will help determine the faith of the wealth of the individual as well as what should be done to the person if a medical emergency arises that involves his or her health Blog Commenting

This is a great inspiring

online drivers education's picture

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post...

It's appropriate time to make

2012 photography grants's picture

It's appropriate time to make some plans for the future and it's time to be happy. I've read this post and if I could I want to suggest you few interesting things or advice.

Post new comment

The content of this field is kept private and will not be shown publicly.

Navigation

User login