首页 \ 问答 \ 仅打印drupal field_view_field值(print drupal field_view_field value only)

仅打印drupal field_view_field值(print drupal field_view_field value only)

我使用下面的代码将节点的字段打印到特定的区域,并且效果很好。 但是,我只想打印没有标签的字段值。 看起来应该很容易,但我有点麻烦。 我很感激任何帮助,因为我对drupal很新。 谢谢

<?php 
  print drupal_render(field_view_field('node', $node, 'field_description')); ?>

I'm using the code below to print the out the field of nodes to specific areas and it works great. But theres an instance where I just want to print the value you of field without the label. Seems as it should be pretty easy but I'm having a bit of trouble. I'd appreciate any help as i'm pretty new to drupal. Thanks

<?php 
  print drupal_render(field_view_field('node', $node, 'field_description')); ?>

原文:https://stackoverflow.com/questions/11694770
更新时间:2023-05-12 09:05

最满意答案

所有跨平台框架(包括HTML)通常具有相同的优点和缺点。

优点:

  • 编写一次代码,在每个目标平台上工作相同。

缺点:

  • 它的工作方式往往不是那么美妙。
  • 性能通常比本机实现低。
  • 有些也有他们自己的小部件集,看起来不合适。
  • 由于个人平台怪癖,你仍然需要到处测试。
  • 您可以通过最低公分母来访问功能。 当支持本地功能时,通常只能以一种方式访问​​它:便携式框架的方式。 这有时与目标平台的首选方式不一致。
  • 如果您可能访问目标平台特有的功能,那么您将失去运行无处不在的可移植性。
  • 每个所谓的“跨平台”框架本身都是一个平台。 先看一下关于怪癖的一点:现在,不必知道N个平台,你必须知道N + 1。

为了以多个平台为目标获得最佳效果

用一个定义良好的API来干净地设计你的核心逻辑(不使用任何UI的部分)。 使其足够普遍,可以在环境之间轻松移植。 (Objective-C和Java中的SQLite真的不同吗?)

根据目标平台的最佳实践设计您的用户界面,使其看起来很棒(并且适合)每个用户。 (对于Android,请参阅http://developer.android.com/design )让UI通过您创建的API与核心逻辑进行交互。


All cross-platform frameworks (including HTML) generally share the same advantages and disadvantages.

Advantages:

  • Write code once that works the same on every target platform.

Disadvantages:

  • The way it works is often not that wonderful.
  • Generally lower performance than native implementations.
  • Some also have their own widget set that looks out of place.
  • Due to individual platform quirks, you still have to test everywhere.
  • You get lowest-common-denominator access to features. When a native feature is supported, often you can only access it in one way: the portable framework's way. This is sometimes at odds with the target platform's preferred way.
  • In the event that you may access features unique to a target platform, you lose run-everywhere portability.
  • Every so-called "cross-platform" framework is a platform in its own right. See earlier point about quirks: Now, instead of having to know N platforms, you have to know N+1.

For best results targeting multiple platforms, I recommend the following:

Design your core logic (the part that doesn't use any UI) cleanly, with a well-defined API. Make it general enough to be fairly easily ported between environments. (Is SQLite really that different in Objective C vs. Java?)

Design your UI following the best practices of your target platforms so that it looks great (and fits in) on each one. (For Android, see http://developer.android.com/design) Have the UI interact with the core logic via the API you created.

相关问答

更多
  • 所有跨平台框架(包括HTML)通常具有相同的优点和缺点。 优点: 编写一次代码,在每个目标平台上工作相同。 缺点: 它的工作方式往往不是那么美妙。 性能通常比本机实现低。 有些也有他们自己的小部件集,看起来不合适。 由于个人平台怪癖,你仍然需要到处测试。 您可以通过最低公分母来访问功能。 当支持本地功能时,通常只能以一种方式访问它:便携式框架的方式。 这有时与目标平台的首选方式不一致。 如果您可能访问目标平台特有的功能,那么您将失去运行无处不在的可移植性。 每个所谓的“跨平台”框架本身都是一个平台。 先看一 ...
  • 通过phonegap你不能直接做到这一点。 您需要使用IHardwareService接口(以本机方式)。 目前的phonegap API无法做到这一点。 我们需要开发一些可以做到这一点的插件。 我认为这些插件目前无法使用。 through phonegap you can not do that straight forward way. You Need to use IHardwareService interface for this ( in native way ). This is not p ...
  • 我目前使用的是intel-xdk ,到目前为止还很棒。 它具有嵌入式纹波仿真器 ,非常适合快速测试应用程序。 I'm currently using intel-xdk and it's been great so far. It has the ripple emulator embedded which is great to test your app quickly.
  • 不,不可能在后台运行Javascript代码(至少在我看来)作为服务。 Android上的Phonegap使用了一个名为Droidgap的特殊活动,它承载了WebView。 此浏览器控件执行JavaScript。 这意味着JS执行只能在此活动内处理,无论是否可见。 您从Google网上论坛链接的代码尝试将Java开发的服务绑定到DroidGap活动,因此该服务不会用JS编写。 您可以在您的孩子活动中的JS代码中从DroidGap活动派生一些背景活动。 例如在你的活动中有一个后台线程,有一个JS回调函数,让线 ...
  • 我已经使用PhoneGap构建了几个应用程序,并且它提供了什么,这是非常好的。 我想指出一些可以帮助你的快速笔记。 Disable device-based features you're not using加速度计,地理位置功能默认情况下打开。 如果您没有使用它们,我会将其关闭,因为您的应用程序将加载更快(初始化)并运行更平滑。 onDeviceReady - 这是一旦phonegap已加载并准备就绪的方法。 $(document).ready或任何你习惯的,在这里并不适用 - 除非你只是做接口/硬编码的 ...
  • 最受欢迎的认证Ember Addon : http : //ember-simple-auth.com/ SSO Ember Addon : http : //vestorly.github.io/torii/ 他们很好地协同工作,您可以获得最好的开发人员用户体验。 希望他们适合你的情况。 祝你好运! ;) Most popular Authentication Ember Addon: http://ember-simple-auth.com/ SSO Ember Addon: http://vestor ...
  • 确保运行cordova build或phonegap build命令。 科尔多瓦 cordova build android cordova build ios PhoneGap的 phonegap build android phonegap build ios Make sure you run cordova buildor phonegap build commands. Cordova cordova build android cordova build ios Phonegap phon ...
  • http://docs.phonegap.com/ :这将为您提供有关源代码的PhoneGap API的见解: http://drupal.org/project/phonegap :在这里,您将获得运行Android的Drupal PhoneGap应用程序的完整源代码。 iPhone和黑莓。 此源代码将帮助您了解PhoneGap开发技术 http://docs.phonegap.com/ : This will give you the insight of PhoneGap APIs with sour ...
  • 对我loadstop通过添加以下行来loadstop , iabrowser = window.open(url, target, op); iabrowser.addEventListener('loadstop', locChanged); 确保正确初始化iabrowser 。 For me loadstop worked by adding following lines, iabrowser = window.open(url, target, op); iabrowser.addEventLis ...
  • 人们在这里回答你的问题并不容易:它太模糊了,而且没有明确的答案。 如果您不熟悉任何技术,您应该首先在线进行自己的研究,按照可用的任何教程进行操作,然后在遇到特定问题或问题时在Stack Overflow上发布问题。 在这种情况下, PhoneGap拥有非常精心编写的详细文档集,可以帮助初次使用的用户。 特别是,详细且易于遵循的入门指南 。 此外,还有一个充满活力且乐于助人的社区,其中包含教程 ,视频, 活动 , 博客和Google网上论坛 。 我通过一次谷歌搜索找到了所有这些。 你试过其中的任何一个吗? I ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。