仅打印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
最满意答案
所有跨平台框架(包括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.
-
使用Phonegap创建Android服务?(Creating an Android Service with Phonegap? (Have phonegap app run even when closed))[2023-11-12]
不,不可能在后台运行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 ...
-
如何安装PhoneGap?(How to install PhoneGap? [closed])[2021-10-03]
人们在这里回答你的问题并不容易:它太模糊了,而且没有明确的答案。 如果您不熟悉任何技术,您应该首先在线进行自己的研究,按照可用的任何教程进行操作,然后在遇到特定问题或问题时在Stack Overflow上发布问题。 在这种情况下, PhoneGap拥有非常精心编写的详细文档集,可以帮助初次使用的用户。 特别是,详细且易于遵循的入门指南 。 此外,还有一个充满活力且乐于助人的社区,其中包含教程 ,视频, 活动 , 博客和Google网上论坛 。 我通过一次谷歌搜索找到了所有这些。 你试过其中的任何一个吗? I ...