• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AdvancedContent and Content Dump
PostPosted: Tue Oct 19, 2010 4:38 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Jan 08, 2010 12:23 am
Posts: 77
Location: Wales - UK
Thinking of using AdvancedContent to enable more flexible content insertion in pages..

But would love to use Content_Dump plugin to showcase Projects on the home page..

Could anyone point me in the right direction to finding the values of the fields I create in

i.e

Code:
{AdvancedContent block="images" label="Select your beloved images" block_type="select_multiple" items=":::list_files dir='images':::" values=":::list_files dir='images' display='relurl':::" smarty="true" assign="images"}
{assign var="img_array" value='|'|explode:$images}
{foreach from=$img_array item="image"}
{if $image !=""}
<img src="{uploads_url}/{$image}" />
{/if}
{/foreach}


So question is.. what syntax would I be using to target the first image in the array, so I could use it as an image on home page as a summary of the page content.. possibly along side the Page title in question and a brief summery text field.

{content_dump}

{foreach from=$dump item=dump}
 {$dump->content->data}
{$dump->content->alias}
{$dump->extensions->video}
{/foreach}

Any pointers here?


Last edited by moonoo on Tue Oct 19, 2010 5:12 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: AdvancedContent and Content Dump
PostPosted: Tue Oct 19, 2010 5:19 pm 
I didn't use content_dump yet. But to get the first item of an array inside a foreach loop use the smarty var "first".
Example:

Code:

{foreach from=$someArray item=itemInsideTheLoop name=someName}

   {if $smarty.foreach.someName.first}

      do whatever you want to do with the first item

   {/if}

   ...

{/foreach}



Top
  
 
 Post subject: Re: AdvancedContent and Content Dump
PostPosted: Tue Oct 19, 2010 9:09 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Jan 08, 2010 12:23 am
Posts: 77
Location: Wales - UK
Cool,

Getting there:

I have been using this plugin: http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/

Demo here https://buildinternet.s3.amazonaws.com/live-tutorials/sliding-boxes/index.htm


To manipulate the output...

Here's what I have so far for the template..

Just need a way of finding the vars for the AdvancedContent blocks I create..


Code:
{content_dump limit_count=10 first_sort=”created” exclude="60,61" first_sort_order=”down” extensions="image,project_description" start_id="62" depth="3,3"}
  {foreach from=$dump item=dump}
<div class="boxgrid captionfull">
<img src="{uploads_url}/images/{$dump->extensions->image->data}" width="200" />
<div class="cover boxcaption">
   <h3>{$dump->content->title}</h3>
   <p>
    {$dump->extensions->project_description->data}
   <a href=/index.php?page={$dump->content->alias}>See: {$dump->content->title}</a>
</p>
</div>
</div>
  {/foreach}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner