Problems, need help? Have a tip or advice? Post it here.
16 posts Page 1 of 2
Dear All,

I am making an advertisement website like "Just Dial".

I have made:
1. A Page view to show details of customer advertisements
2. A list view to show all customers advertisement
3. Dynamic Folders

Now, I have some categories (Folders) on the home page, i want to make it so, that once the categories is clicked (eg : Architects) it should show only the advertisements of the clients belonging to the category.

I have all the rest working, but the categories are not implementing the <cms:show k_folder_link />

my code is:
Code: Select all
<cms:pages masterpage='business.php' limit='45' paginate='1'>
                         <div class="col-1-4" style="padding-right: 2.5%;">
                            <div class="content">
                               <div id='parent_div_1'>
                                            <a href="<cms:show k_page_folderlink />">
                                                  <img src="<cms:show k_page_folderimage />" width="80px" height="80px" />
                                            </a>
                                 <div style="text-align: center;">
                                               <a href="<cms:show k_page_folderlink />"><cms:show k_page_foldertitle /></a>
                                            </div>
                              </div>

                              <!--<div id='parent_div_1'>
                                 <div><img src="images/icons/advert.png" width="80px" height="80px" /></div>
                                 <div>Advertisements</div>
                              </div>-->
                            </div>
                         </div>
                                <cms:paginator />
                                </cms:pages>


Please help.
Image
where innovation meets technology
Hello,
there are not only Page view and Home view. When click on <cms:show k_page_folderlink /> you go to Folder view (http://www.couchcms.com/docs/concepts/views.html). So you could try smth:
Code: Select all
<cms:if k_is_folder >
<cms:pages masterpage='business.php' folder=k_folder_name limit='45' paginate='1'>
</cms:pages>
</cms:if>
@Musman

Thanks for the reply. I have already tried this method. The problem that I get is that the folder icons as well as the folder name do not show. The page becomes blank. :(
Image
where innovation meets technology
Hi Genxcoders,

Please refer to the documentation: http://www.couchcms.com/docs/concepts/u ... lders.html

I believe your solutions lies in the <cms:folders> tag. Please let me know if you need more assistance with this.
Image
@Bartonsweb

I am not using any sub-folders. Gave a thought to the solution, that you have suggested, all night, last night. But then since I am using only simple folders.

I am attaching the site source here. Please see if you (or anyone else) can replicate the same at your end.

Regards.
Image
where innovation meets technology
genxcoders wrote: @Bartonsweb

I am not using any sub-folders. Gave a thought to the solution, that you have suggested, all night, last night. But then since I am using only simple folders.

I am attaching the site source here. Please see if you (or anyone else) can replicate the same at your end.

Regards.


Yes please post your template file here, can you also please post the structure of your folders and pages.

Also, please place <cms:dump /> inside your pages tag and paste to us the folder variables that are outputted in the variable list. There should be k_page_folderlink and it's value should tell us why it is not working.
Image
here is the code!!!

Attachments

Image
where innovation meets technology
genxcoders wrote: here is the code!!!



Can you please include "business.php"
Image
This is the <cms:dump /> list:

k_page_folderid: 4
k_page_foldername: agriculture
k_page_foldertitle: Agriculture
k_page_folderdesc:
k_page_folderimage: http://localhost/clickmeindia/couch/upl ... s/agri.png
k_page_folderlink: http://localhost/clickmeindia/business.php?f=4
k_page_folderpagecount: 1
k_page_foldertotalpagecount: 1
k_page_folderparentid: -1
k_page_folderweight: 0
k_cms_version: 1.4
k_cms_build: 20140117
k_admin_link: http://localhost/clickmeindia/couch/
k_admin_page:
k_site_link: http://localhost/clickmeindia/
k_admin_path: D:/wamp/www/clickmeindia/couch/
k_site_path: D:/wamp/www/clickmeindia/
k_template_title: Business Entry Page
k_template_name: business.php
k_template_id: 3
k_template_is_clonable: 1
k_template_desc:
k_template_access_level: 0
k_template_is_commentable: 1
k_template_is_executable: 1
k_template_is_hidden: 0
k_template_order: 0
k_template_nested_pages: 0
k_template_gallery: 0
k_template_link: http://localhost/clickmeindia/business.php
k_prettyurls: 0
k_site_charset: utf-8
k_email_from: contact@yourdomain.com
k_email_to: youremail@gmail.com
k_is_commentable: 1
k_page_title: three
k_page_name: three
k_page_folder_id:
k_publish_date:
k_access_level: 0
k_comments_open: 1
company_website:
company_map:
company_person:
company_fb_page:
company_card:
company_address:
company_contact:
company_products:
k_is_page: 1
k_is_list: 0
k_page_id: 10
k_page_date: 2014-11-07 22:01:53
k_page_modification_date: 2014-11-07 23:04:01
k_page_draft_of: 0
k_comments_count: 4
k_page_link: http://localhost/clickmeindia/business.php?p=10
k_count: 1
k_total_records: 3
k_total_records_on_page: 3
k_current_record: 1
k_absolute_count: 1
k_record_from: 1
k_record_to: 3
k_total_pages: 1
k_current_page: 1
k_paginate_limit: 45
k_paginated_top: 1
k_paginated_bottom: 0
k_paginator_required: 0
k_paginate_link_next:
k_paginate_link_prev:
k_paginate_link_cur:



business.php and business_list.html are included in this message!!!

Attachments

Image
where innovation meets technology
@genxcoder,

The solution has already been given in this thread. There are two things that you need to do
1. As @musman suggested, add 'folder=k_folder_name' to your cms:pages block e.g.
Existing code:
<cms:pages masterpage='business.php' >

Modified code:
<cms:pages masterpage='business.php' folder=k_folder_name >


2. The code above handles the 'folder-view' but you still need to provide your visitors a way to access the template in that folder-view!
To do so, as @Bartonsweb pointed out, you need to use cms:folders tag on your main page (or the sidebar) to provide links to the various folders. It is only then that the code in point 1 will work.

Hope this helps.
16 posts Page 1 of 2
cron