Hallo zusammen,
Ich bin jetzt schon eine weile daran einen Content der auf einer Seite angezeigt wird in ein Widget zu packen leider funktioniert das nicht so wie ich es gern möchte.
Ich füge hier nochmal den Code ein:
Aus dieser Datei würd ich das was ich brauche gerne raus nehmen
Smarty
{block content}
{loop as $post}
{* SETTINGS AND DATA *}
{var $meta = $post->meta('item-data')}
{var $settings = $options->theme->item}
{* SETTINGS AND DATA *}
{*RICH SNIPPET WRAP*}
<div class="item-content-wrap" itemscope itemtype="http://schema.org/LocalBusiness">
<meta itemprop="name" content="{$post->title}">
{*RICH SNIPPET WRAP*}
{* CONTENT SECTION *}
<div class="entry-content">
{* GALLERY SECTION *}
{includePart portal/parts/single-item-gallery}
{* GALLERY SECTION *}
<div class="entry-content-wrap" itemprop="description">
{if $post->hasContent}
{!$post->content}
{else}
{!$post->excerpt}
{/if}
</div>
</div>
{* CONTENT SECTION *}
<div class="column-grid column-grid-2">
<div class="column column-span-1 column-narrow column-first">
{* ADDRESS SECTION *}
{includePart portal/parts/single-item-address}
{* ADDRESS SECTION *}
{* CONTACT OWNER SECTION *}
{includePart portal/parts/single-item-contact-owner}
{* CONTACT OWNER SECTION *}
<div class="ait-get-directions-button">
</div>
{* SOCIAL SECTION *}
{includePart portal/parts/single-item-social}
{includePart portal/parts/single-item-social-icons}
{* SOCIAL SECTION *}
</div>
<div class="column column-span-1 column-narrow column-last">
{* OPENING HOURS SECTION *}
{includePart portal/parts/single-item-opening-hours}
{* OPENING HOURS SECTION *}
</div>
</div>
{* CLAIM LISTING SECTION *}
{if defined('AIT_CLAIM_LISTING_ENABLED')}
{includePart portal/parts/claim-listing}
{/if}
{* CLAIM LISTING SECTION *}
<input type="hidden" id="item_address" value="{$meta->map['address']}"/>
<input type="hidden" id="item_lat" value="{$meta->map['latitude']}"/>
<input type="hidden" id="item_lng" value="{$meta->map['longitude']}"/>
<div id="mapcontainer" class="getDirGoogleMap"></div>
<div id="map-directions" class="getDirDirections"></div>
{* MAP SECTION *}
{includePart portal/parts/single-item-map}
{* MAP SECTION *}
{* FEATURES SECTION *}
{includePart portal/parts/single-item-features}
{* FEATURES SECTION *}
{* REVIEWS SECTION *}
{if defined('AIT_REVIEWS_ENABLED')}
{includePart portal/parts/single-item-reviews}
{/if}
{* REVIEWS SECTION *}
{*RICH SNIPPET WRAP*}
</div>
{*RICH SNIPPET WRAP*}
{/loop}
Alles anzeigen
Aber ich bekomm es einfach nicht hin, dass dies im Widget ausgeführt wird.
Hier hab ich noch den Code für die [COLOR=#3E3E3E]{* ADDRESS SECTION *}
[/COLOR]
Smarty
<div class="address-container"> <h2>{__ 'Address'}</h2>
<div class="content">
{if !$meta->map['address'] && $settings->addressHideEmptyFields}{else}
<div class="address-row row-postal-address" itemscope itemtype="http://schema.org/PostalAddress">
<div class="address-name"><h5>{__ 'Address'}:</h5></div>
<div class="address-data" itemprop="streetAddress"><p>{if $meta->map['address']}{$meta->map['address']}{else}-{/if}</p></div>
</div>
{/if}
{if !$settings->addressHideGpsField}
{if ($meta->map['latitude'] === "1" && $meta->map['longitude'] === "1") != true}
<div class="address-row row-gps" itemscope itemtype="http://schema.org/Place">
<div class="address-name"><h5>{__ 'GPS'}:</h5></div>
<div class="address-data" itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
<p>
{if $meta->map['latitude'] && $meta->map['longitude']}
{$meta->map['latitude']}, {$meta->map['longitude']}
<meta itemprop="latitude" content="{$meta->map['latitude']}">
<meta itemprop="longitude" content="{$meta->map['longitude']}">
{else}-{/if}
</p>
</div>
</div>
{/if}
{/if}
{if !$meta->telephone && $settings->addressHideEmptyFields}{else}
<div class="address-row row-telephone">
<div class="address-name"><h5>{__ 'Telephone'}:</h5></div>
<div class="address-data">
{if $meta->telephone}
<p>
<span itemprop="telephone"><a href="tel:{$meta->telephone}" class="phone">{$meta->telephone}</a></span>
</p>
{else}
<p>-</p>
{/if}
{if is_array($meta->telephoneAdditional) && count($meta->telephoneAdditional) > 0}
{foreach $meta->telephoneAdditional as $data}
<p>
<span itemprop="telephone"><a href="tel:{$data['number']}" class="phone">{$data['number']}</a></span>
</p>
{/foreach}
{/if}
</div>
</div>
{/if}
{if !$meta->email && $settings->addressHideEmptyFields}{else}
<div class="address-row row-email">
<div class="address-name"><h5>{__ 'Email'}:</h5></div>
<div class="address-data"><p>{if $meta->email && $meta->showEmail}<a href="mailto:{$meta->email}" target="_top" itemprop="email">{$meta->email}</a>{else}-{/if}</p></div>
</div>
{/if}
{if !$meta->web && $settings->addressHideEmptyFields}{else}
<div class="address-row row-web">
<div class="address-name"><h5>{__ 'Web'}:</h5></div>
<div class="address-data"><p>{if $meta->web}<a href="{$meta->web}" target="_blank" itemprop="url" {if $settings->addressWebNofollow}rel="nofollow"{/if}>{if $meta->webLinkLabel}{$meta->webLinkLabel}{else}{$meta->web}{/if}</a>{else}-{/if}</p></div>
</div>
{/if}
</div>
</div>
Alles anzeigen
[COLOR=#3E3E3E]
[/COLOR]
Wer kann mir bitte helfen.
viel Dank