Hi there!
I'm building an Audi fan site where i want the front page (http://webtest.stikzdesigns.com/index.php) to show the most recent post. As you can see at the middle of the website, i've assigned 2 editable boxes. One is the box where the news comes in, and the box next to it is the archive box.
Now i've got the Archive function to work properly, but because i've used the index.php as a clonable page, webtest.stikzdesigns.com will show up without having any content at all.
I understand that its clean because it is a clonable page, but i want to know if there is a possibility to show the newest post (i.e. as shown in the archive: This is my forth post) on visiting the first page of my website.
Thanks in advance!
(excuse my bad english, im dutch
)
SOLUTION:
After some messages back and forth, these kind guys helped me out on finding a solution.
step 1:
So, add the regions where you've used the <cms:editable ... /> tag between the template tag, like this:
step 2:
Make a new document named: page_detail.html inside the couch/snippit folder, which can look like this:
/subdomains/webtest/httpdocs/couch/snippets/
step 3:
Add the following lines of code to the page_detail.html file.
In my case, i've had two editable regions inside the divs "bottom-box" and "box_top_left".
step 4:
Next, replace these div's on your (for instance) index.php file and replace it by the following lines of code:
This page will now show the most recent post of your clonable template sorted by date.
I hope this explains alot for you, atleast it made me alot of things clear!
Thanks alot KK and Simon!
Let me know if i made any mistakes or misunderstood the whole idea.
I'm building an Audi fan site where i want the front page (http://webtest.stikzdesigns.com/index.php) to show the most recent post. As you can see at the middle of the website, i've assigned 2 editable boxes. One is the box where the news comes in, and the box next to it is the archive box.
Now i've got the Archive function to work properly, but because i've used the index.php as a clonable page, webtest.stikzdesigns.com will show up without having any content at all.
I understand that its clean because it is a clonable page, but i want to know if there is a possibility to show the newest post (i.e. as shown in the archive: This is my forth post) on visiting the first page of my website.
Thanks in advance!
(excuse my bad english, im dutch

SOLUTION:
After some messages back and forth, these kind guys helped me out on finding a solution.
step 1:
- Code: Select all
<cms:template title='Index' clonable='1'>
...editable regions defined here...
</cms:template>
So, add the regions where you've used the <cms:editable ... /> tag between the template tag, like this:
- Code: Select all
<cms:template clonable='1' title='index' >
<cms:editable name='box_top_left' />
<cms:editable name='bottom_box' />
</cms:template>
step 2:
Make a new document named: page_detail.html inside the couch/snippit folder, which can look like this:
/subdomains/webtest/httpdocs/couch/snippets/
step 3:
Add the following lines of code to the page_detail.html file.
- Code: Select all
<div id='box-top-left'>
<cms:show box_top_left />
</div>
<div id='bottom-box'>
<cms:show bottom_box />
</div>
In my case, i've had two editable regions inside the divs "bottom-box" and "box_top_left".
step 4:
Next, replace these div's on your (for instance) index.php file and replace it by the following lines of code:
- Code: Select all
<cms:if k_is_page >
<cms:embed 'page_detail.html' />
<cms:else />
<cms:pages masterpage='index.php' orderby='publish_date' order='desc' limit='1'>
<cms:embed 'page_detail.html' />
</cms:pages>
</cms:if>
This page will now show the most recent post of your clonable template sorted by date.
I hope this explains alot for you, atleast it made me alot of things clear!
Thanks alot KK and Simon!
Let me know if i made any mistakes or misunderstood the whole idea.