2019-07-23, 05:18:58
This relates to this question: http://get-simple.info/forums/showthread.php?tid=11166
Yes, you did it correct.
There are some ways you could do that.
If a simple redirect enough, you can add a statement to your template above, for example:
But in this case you will still see the URL like: website.com/gallery/catalog/my-category/ and maybe that's not what you want...
Another way to accomplish this (like you already did) is to completely customize the output (see here: https://ehret-studio.com/articles/simplecatalog-itemmanager-based-plugin/how-to-customize-the-simplecatalog-output/) by using $catalog->renderSection() method:
Just create a page with the name and slug like your category e.g. 'my-category' (the adding of [[catalog_content]] isn't necessary in this case).
Next, replace the 'get_page_content()' function in your template with following statement:
NOTE: Change the 'routeid' => 3 with the id of your real category whose items you want to show. You can find out the id by going to GS Admin > ItemManager > Categories, then click on your category name.
Maybe this'll help: http://get-simple.info/forums/showthread.php?tid=9619&pid=61303#pid61303
Good luck.
Yes, you did it correct.
There are some ways you could do that.
If a simple redirect enough, you can add a statement to your template above, for example:
PHP Code:
if($catalog->processor->config->pageSlug == 'catalog') {
Util::redirect('./my-category/');
}
But in this case you will still see the URL like: website.com/gallery/catalog/my-category/ and maybe that's not what you want...
Another way to accomplish this (like you already did) is to completely customize the output (see here: https://ehret-studio.com/articles/simplecatalog-itemmanager-based-plugin/how-to-customize-the-simplecatalog-output/) by using $catalog->renderSection() method:
Just create a page with the name and slug like your category e.g. 'my-category' (the adding of [[catalog_content]] isn't necessary in this case).
Next, replace the 'get_page_content()' function in your template with following statement:
PHP Code:
<?php
if(get_page_slug(false) == 'my-category') {
$catalog->renderSection('FrontendItemList', array('routeid' => 3));
echo $catalog->content;
} else {
get_page_content();
}
NOTE: Change the 'routeid' => 3 with the id of your real category whose items you want to show. You can find out the id by going to GS Admin > ItemManager > Categories, then click on your category name.
(2019-07-23, 04:29:26)usderofit Wrote: Also, at the moment, when going to an items page (what i will use as an album) only one image is shown, how can i show all of the images in this item?
Maybe this'll help: http://get-simple.info/forums/showthread.php?tid=9619&pid=61303#pid61303
Good luck.