Hi Mark,
Grab the version 1.2.
In it I added 3 new parameters:
1) field_is_date - Optional. Accepts two values: “yes” and “no”. Default value is “no”. Set this parameter to “yes” in case custom field contains date.
2) date_format - Optional. Used in case “field_is_date” parameter is set to “yes”. Allows to specify ExpressionEngine’s date format.
3) date_localize - Optional. Used in case “field_is_date” parameter is set to “yes”. Allows you to specify if the date should be localized. Accepts two values: “yes” and “no”. Default value is “no”.
So, the code
{exp:single_field field="restock_date" entry_id="{entry_id}" field_is_date="yes" date_format="%D, %F %d, %Y" site="1"}
should output the date formatted.
Great plugin Laisvunas! I know I’ve played around with this before, and here I am once again trying to figure it out. I have a right panel which displays more custom fields and tidbits from my entry. Right now, on the weblog entry page, I have two dedicated exp:weblog:entries tags, one for the main content, and the other for a group of custom fields (between 3-5 let’s say).
Given the circumstances, what would be less intensive on the queries?
IS there a way to set this up so I can strip out LG Replace tags? I have:
<meta name='DC.description' content='{exp:md_eexcerpt if_exceeds="31" stop_after="30" append="…"}
{exp:single_field field="summary" weblog="{my_weblog}" url_title="{segment_3}" site="3" field_format="raw"}
{/exp:md_eexcerpt}' />
I haven’t found anything that could pull the tags – {media_1} – for example, out, so that it is clean text for the meta tag.
Kyle, I don’t see your media tag in your code? Am I misunderstanding something? If you want to strip out LG Replace fields, you can use Find and Replace or Find and Replace Plus to strip them out.
The {media_1} tags get output in the text. Replace Plus did the trick. Thanks for pointing me in the right direction. For reference:
<meta name='DC.description' content='{exp:md_eexcerpt if_exceeds="31" stop_after="30" append="…"}
{exp:replace_plus find=":LD:media_1:RD:|:LD:media_2:RD:|:LD:media_3:RD:" multiple="yes"}
{exp:single_field field="summary" weblog="{my_weblog}" url_title="{segment_3}" site="3" field_format="raw"}
{/exp:replace_plus}{/exp:md_eexcerpt}' />
This did the trick. There’s probably a cleaner approach, but it worked.
I wanted to say, thank you for the nice plugin. On one site i used geevar for this, but this is a nice alternative. Added bonus: This plugin uses core.typography, so if you use a field that has formatting set to markdown, then the plugin will magically display the formatted text for you.
Laisvunas, what a great plug-in. I’m doing something similar with it to Erik_Reagan and it’s almost working like a dream… but not quite! Here’s what I have so far:
{exp:child_categories parent="62" child_categories_sort_direction="asc" entries_sort_by="date" entries_sort_direction="asc" parse="inward"}
{child_category_start}
<h2 id="{child_category_url_title}">{if child_category_description}<abbr title="{child_category_description}">{child_category_name}</abbr>{if:else}{child_category_name}{/if}</h2>
{child_category_end}
{entries_start}
<strong>{if title_html}{title_html}{if:else}{title}{/if}</strong>
{exp:single_field field="body" weblog="faq" entry_id="{entry_id}" field_format="wysiwyg"}
{entries_end}
{/exp:child_categories}
The only problem is that the {body} field in question uses LG TinyMCE and so is a field type of WYSIWYG, and my attempt to use WYSIWYG as a field_format doesn’t work.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.