简体   繁体   中英

Drupal custom field customization

I am using Drupal 7.

I created a custom field for article nodes, which is a text field, with unlimited values so it's essentially an unordered list. I want to be able to customize the area in which the new field is displayed, but no page.tpl.php it renders under the page content, with the body. The new field does not create a new block in which I can edit. I want to limit the containing div to 350px, and then place a 300x250px ad to the right. So the custom field list on the left, with an ad on the right. If anyone knows a way to doing this rather than finding the div ids and sloppily overriding the CSS to do this please let me know.

I'm not sure your use case and requirements are completely clear to me, but it sounds like you might want to read up on "Render arrays", a new-in-Drupal 7 feature which allows more fine-grained control of content output/display. This is part of the Drupal Core and the official documentation might be a good starting point, but there are many other articles and tutorials (use: "render array" Drupal <-- your search on Google) which might be helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM