Noob here...I am trying to create a custom content type that gives my client the option to include, or not, a snippet of default text with the node.
The content type is for a job posting, and I would like to include formatted text that includes links to the employment application with additional text. Although 99% of the postings will need this text to fill out the application, there are a couple scenarios where it would not be appropriate, like training sessions, etc.
I'm using D7 with Views 3, what is the best way to make this work?
I did this by creating a separate field with the text filled by a "Default value". The user could easily delete or modify it as needed.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: "Cindy Dykstra, WebMaker Inc."
Noob here...I am trying to create a custom content type that gives my client the option to include, or not, a snippet of default text with the node.
The content type is for a job posting, and I would like to include
formatted text that includes links to the employment application with additional text. Although 99% of the postings will need this text to fill out the application, there are a couple scenarios where it would not be appropriate, like training sessions, etc.
Thanks Nancy, I implemented that but thought there might be a better way to make it easier on the client. It would be much more intuitive for them to check a box Yes or No to include the links/text to the application.
Cindy Dykstra WebMaker Inc. http://webmakerinc.com 719-276-0908 toll-free: 866-376-0908
Facebook http://www.facebook.com/webmakerinc - LinkedIn http://www.linkedin.com/in/webmakerinc
On 4/11/2012 4:39 PM, Ms. Nancy Wichmann wrote:
I did this by creating a separate field with the text filled by a "Default value". The user could easily delete or modify it as needed. /*Nancy*/ Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
------------------------------------------------------------------------ *From:* "Cindy Dykstra, WebMaker Inc." Noob here...I am trying to create a custom content type that gives my client the option to include, or not, a snippet of default text with the node. The content type is for a job posting, and I would like to include formatted text that includes links to the employment application with additional text. Although 99% of the postings will need this text to fill out the application, there are a couple scenarios where it would not be appropriate, like training sessions, etc.
That could be done with a simple module.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: "Cindy Dykstra, WebMaker Inc."
Thanks Nancy, I implemented that but thought there might be a better way to make it easier on the client. It would be much more intuitive for them to check a box Yes or No to include the links/text to the application.
Without much coding I see two more ways. You could add a line of code to the tpl.php file of that content type with the default text hard coded that gets only printed if the checkbox is checked.
Or, without editing any file, you could create a view with the default text as its only content and show it only if the checkbox is enabled.
On Wed, Apr 11, 2012 at 8:10 PM, steeph ml@mixblog23.de wrote:
Without much coding I see two more ways. You could add a line of code to the tpl.php file of that content type with the default text hard coded that gets only printed if the checkbox is checked.
Or, without editing any file, you could create a view with the default text as its only content and show it only if the checkbox is enabled.
Can't this idea be done by creating a node of the default text and then using views to add the node in the view if the checkbox is clicked?
The second/third option is where I started last night before a storm knocked out my internet. Will be working on this and let you know how it turns out...
Cindy Dykstra WebMaker Inc. http://webmakerinc.com 719-276-0908 toll-free: 866-376-0908
Facebook http://www.facebook.com/webmakerinc - LinkedIn http://www.linkedin.com/in/webmakerinc
On 4/12/2012 6:34 AM, Earnie Boyd wrote:
On Wed, Apr 11, 2012 at 8:10 PM, steephml@mixblog23.de wrote:
Without much coding I see two more ways. You could add a line of code to the tpl.php file of that content type with the default text hard coded that gets only printed if the checkbox is checked.
Or, without editing any file, you could create a view with the default text as its only content and show it only if the checkbox is enabled.
Can't this idea be done by creating a node of the default text and then using views to add the node in the view if the checkbox is clicked?
On 04/12/2012 02:34 PM, Earnie Boyd wrote:
On Wed, Apr 11, 2012 at 8:10 PM, steephml@mixblog23.de wrote:
Or, without editing any file, you could create a view with the default text as its only content and show it only if the checkbox is enabled.
Can't this idea be done by creating a node of the default text and then using views to add the node in the view if the checkbox is clicked?
Yes, but if views already is used, the text could go as well there (custom text field or rewrite a field).
But that was just my idea in case Cindy does not want or cannot create an own module. That's dure the cleaner way, I guess.
That's what I ended up doing...I gave the check box in Content Type one value (1|Yes) since that's the default. Then in Views, adding the field produced the "1" on those nodes with the box checked, so then I just used the Rewrite Results to display the text/links I needed. The nodes where the box is unchecked displays nothing as it should.
Thanks all for the help!
Cindy Dykstra WebMaker Inc. http://webmakerinc.com 719-276-0908 toll-free: 866-376-0908
Facebook http://www.facebook.com/webmakerinc - LinkedIn http://www.linkedin.com/in/webmakerinc
On 4/12/2012 12:16 PM, steeph wrote:
On 04/12/2012 02:34 PM, Earnie Boyd wrote:
On Wed, Apr 11, 2012 at 8:10 PM, steephml@mixblog23.de wrote:
Or, without editing any file, you could create a view with the default text as its only content and show it only if the checkbox is enabled.
Can't this idea be done by creating a node of the default text and then using views to add the node in the view if the checkbox is clicked?
Yes, but if views already is used, the text could go as well there (custom text field or rewrite a field).
But that was just my idea in case Cindy does not want or cannot create an own module. That's dure the cleaner way, I guess.
I should maybe read the chapter on custom modules first but...would this be a good one for a first project? My php skills are a little rusty, but intact, I think.
Cindy Dykstra WebMaker Inc. http://webmakerinc.com 719-276-0908 toll-free: 866-376-0908
Facebook http://www.facebook.com/webmakerinc - LinkedIn http://www.linkedin.com/in/webmakerinc
On 4/11/2012 4:54 PM, Ms. Nancy Wichmann wrote:
That could be done with a simple module. /*Nancy*/ Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
------------------------------------------------------------------------ *From:* "Cindy Dykstra, WebMaker Inc." Thanks Nancy, I implemented that but thought there might be a better way to make it easier on the client. It would be much more intuitive for them to check a box Yes or No to include the links/text to the application.
Yes, it would. If you get stumped, give me a shout.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: "Cindy Dykstra, WebMaker Inc."
I should maybe read the chapter on custom modules first but...would this be a good one for a first project? My php skills are a little rusty, but intact, I think.