Drupal 7 template custom fields
Active 5 years, 5 months ago. Viewed 10k times. What to do now???? Improve this question. Community Bot 1. Shafiul Shafiul 1, 5 5 gold badges 30 30 silver badges 40 40 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Attiks Attiks 2, 1 1 gold badge 14 14 silver badges 16 16 bronze badges. Thanks - I almost forgot about doing this within preprocessor!
Nevos Nevos 1 1 silver badge 3 3 bronze badges. What does 'und' stand for? I've seen it in many places.
Language neutral uses the language code 'und', which means undefined and is specified to be used for such cases by the ISO standard. You'll see this language code in Drupal source code all around, so good to know. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 0. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings. If you are not familiar with how to install Drupal, it's actually not that hard, and you can install it in a LAMP environment.
There are links at the end of this article in the Resources section for some basic Drupal install information. Note that Drupal has an entire command-line utility of its own called drush where you can install core and download contrib modules, but for the sake of this tutorial, I'm using the Drupal Admin UI. If you really decide to dive in head first to Drupal, drush can be a huge time saver.
When creating a new content type, I like to do a quick mock-up to get a better picture of how I want the finished product to look. Figure 4 shows what I came up with for my Event. The mock-up helps determine which modules I'll use. You can find links for these in the Resources section. Contributed modules and Theme contrib required the following:. Now that you know what modules and Theme you are going to use for building your Event content type, download the latest stable recommended release from drupal.
The recommended release should be sufficient, but there may be times when you run into a bug and need to use the latest dev release. Figure 5 shows an example of release information for a contrib module on drupal. Figure 5. The latest recommended release of a module is shown highlighted in green 7.
Dev releases are red, and a new 2. Although you will see a Modules folder at root, never add third-party modules to this one; it's a core folder that gets updated or changed only when a core Drupal release comes out. You also need to download some map markers from the Get Locations project page. The getlocations-markers.
Most likely you will have to create the Libraries folder on a new Drupal install, but if it exists already, simply make a new folder within that called getlocations, and then put the newly untarred Markers folder within that. Using the admin toolbar, click on Appearance, and activate the Professional Theme listed under Disabled Themes. Use the Enable and set default setting that will enable it and bring it up to the top under Enabled Themes.
See Resources for links. Once logged in, generate a new key, or use an existing one from the API Access tab. Now is a good time to set your site's Locale as well. Chances are your default time zone already is set, but it's good to confirm or adjust it.
Accept all other defaults here and save. Let's create a custom date format. Once on the Date and Time formats page, click Add Format. In the Format string text box, copy and paste or type in this string:. Let's give this new format a name. Go back to the main Date and Time page you were just on, and click Add date type. Let's call it Full date with time zone for Date type. For Date Format, choose from the select menu, and most likely the new format you just created will be the last item in the menu.
Choose that, and save Add date type. The new Date Type is saved you'll refer to it later. For the event image, you'll want a custom style. For width, choose , and save Add effect. The new effect is saved, and you will refer to it later. You now get a new page with options. You can pretty much accept the defaults here, but let's customize a little:.
Save the content type. Back on the content types landing page, you now will see Event Machine name: event , in addition to Basic page and Article, as shown in Figure 6. Click manage fields for Event. You'll see that the Body Field already exists. Click to edit on Body, and simply change the Label to Event Overview, and save the settings.
Figure 7 shows the finished Manage Fields page. Figure 7. The finished Fields page for Event. As you might have noticed when creating all these fields, there are dozens of other options for customization, and for the most part, you accepted many of the defaults. However, as you get more into Drupal site building, you'll want to explore these options and experiment with them. Now you just need to do a little theming using the Manage Display tab for your Event content type.
This will be a two-part process.
0コメント