I am create photo gallery by using folders, here is my code:
This is my product.php page, I put the whole CMS code in one page. Let say I have menu, Bedroom, Dining Set and etc, I am managed to make the navigation/menu point to the right photo gallery folder.
The page is cloanable, the URL links look like: .../products.php?f=1, ../products.php?f=2 and so on. My problem is how can I make the the product.php point to the specific folder directly such as bedroom folder?
And I put whole code within one page, is that going to cause any problem?
Is this code correct:
I am now getting this result, It will auto generate a page for a product. Is this the correct way to insert/display to the page? Should it generate a page or a item?
How can I make the current active link to be highlighted?
- Code: Select all
<?php require_once( '../couch/cms.php' ); ?>
<cms:template title='Gallery' clonable='1' dynamic_folders='1' gallery='1'>
<cms:editable
name="gg_image"
label="Image"
desc="Upload your main image here"
width='480'
show_preview='1'
preview_height='200'
type="image"
/>
<cms:editable
name = 'gg_thumb'
assoc_field = 'gg_image'
label = 'CMS Thumbnail Image'
desc = 'Only used within the admin panel'
width = '115'
height = '115'
enforce_max = '1'
type = 'thumbnail'
/>
<cms:editable
name = 'grid_thumb'
assoc_field = 'gg_image'
label = 'Grid Thumbnail Image'
desc = 'Used on the front end'
width = '480'
height = '302'
crop = '1'
type = 'thumbnail'
/>
</cms:template>
<cms:if k_is_page >
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
</head>
<body>
<cms:folders>
<ul>
<li><a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></li>
</ul>
</cms:folders>
</div>
<div class="productwrap">
<div class="products">
<ul>
<cms:pages folder=k_folder_name limit='9' paginate='1' >
<li><a class="titan-lb" href="#inline<cms:show k_count />" data-titan-group="gallery-misc" title="<cms:show k_page_title />"><img src="<cms:show grid_thumb />" /><br><cms:show k_page_title /></a></li>
<div id="inline<cms:show k_count />" class="pop-up" style="display:none;">
<div class="pop-up-image"><img src="<cms:show gg_image />"></div>
<div class="pop-up-description">
<ul>
<cms:show main_content3 />
</ul>
</div>
</div>
<cms:paginator />
</cms:pages>
</ul>
</div>
</div>
</body>
</html>
<cms:else />
<cms:embed 'products-bedroom.html' />
</cms:if>
<?php COUCH::invoke(); ?>
This is my product.php page, I put the whole CMS code in one page. Let say I have menu, Bedroom, Dining Set and etc, I am managed to make the navigation/menu point to the right photo gallery folder.
The page is cloanable, the URL links look like: .../products.php?f=1, ../products.php?f=2 and so on. My problem is how can I make the the product.php point to the specific folder directly such as bedroom folder?
And I put whole code within one page, is that going to cause any problem?
Is this code correct:
- Code: Select all
<cms:pages folder=k_folder_name limit='9' paginate='1' >
<li><a class="titan-lb" href="#inline<cms:show k_count />" data-titan-group="gallery-misc" title="<cms:show k_page_title />"><img src="<cms:show grid_thumb />" /><br><cms:show k_page_title /></a></li>
<div id="inline<cms:show k_count />" class="pop-up" style="display:none;">
<div class="pop-up-image"><img src="<cms:show gg_image />"></div>
<div class="pop-up-description">
<ul>
<cms:show main_content3 />
</ul>
</div>
</div>
<cms:paginator />
</cms:pages>
I am now getting this result, It will auto generate a page for a product. Is this the correct way to insert/display to the page? Should it generate a page or a item?
How can I make the current active link to be highlighted?