Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
First off I d like to say thank you for this wonderful CMS that you developed and I definitely plan on paying for it as well as keeping the link on my clients websites..I am new to Couch CMS or any CMS for that matter..I developed a newspaper site and am having issues understanding how to use Couch code for my news articles page..I have a page that is hooked to my index.html called news.html....Basically on index.html I have a carousel slider with images and a title that when clicked go to the news.html page where all the news stories are at....Im not quite sure as to how to make this work..
1.Is it possible to link this news page to the carousel images on my index page and be able to add new stories as needed? on the news page and slider?
2.Or if not I can add the images separate to the slider but a way to be able to allow my client to go to the news page when they need to add another story and add it on there?
My issue is Im only understanding the richtext tag I feel.I would really like to just add the news page in the editor but have it to where my client could click edit and select add new story with images.I cant seem to make that work.
Thank you
Hello @zerotechz,

I'm glad you found Couch useful :)

Replying to your issue -
The standard method (in Couch) to create the 'news' section would be to use a clonable template, say, named 'news.php'. Define all editable region in it that you'd need for a single news item e.g. 'my_content' and 'my_image'. Now your client can create a new news item by simply creating a new cloned page of this template (you'll find all details in our tutorial http://www.couchcms.com/docs/tutorials/portfolio-site/).

Your problem is that you'd like to show the data from cloned-pages of news.php in another template 'index.php' (as a carousel).

That actually is not a problem at all. For example, if you place the following in index.php
Code: Select all
<cms:pages masterpage='news.php' limit='10'>
    <img src="<cms:show my_image />" />
</cms:pages>

- the code above will display images from the latest 10 news pages.
The key above is the use of 'masterpage' parameter to make cms:pages get data from news.php (although the code is executing in index.php).

You can now format the code to create the carousel.

Hope it helps.
2 posts Page 1 of 1