Skip to content

Commit

Permalink
Merge pull request #2 from aligent/feature/sitemap-module-development
Browse files Browse the repository at this point in the history
Include screenshots for Readme file.
  • Loading branch information
anton-karunarathne-aligent authored Mar 28, 2023
2 parents 32f0416 + ab60073 commit 0d90be2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Model/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\Escaper;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Filesystem;
use Magento\Framework\Model\Context;
use Magento\Framework\Model\ResourceModel\AbstractResource;
Expand Down Expand Up @@ -101,13 +102,14 @@ public function __construct(

/**
* Override changes for the Magento\Sitemap\Model\Sitemap class
* Check sitemap_base_url configuration is exists get the base url from configuration ( line 119 - 128)
* If not exists sitemap_base_url configuration , get the default magento base url (line 140)
* Check sitemap_base_url configuration is exists get the base url from configuration ( line 117 - 119)
* If not exists sitemap_base_url configuration , get the default magento base url (line 121)
* Get url
*
* @param string $url
* @param string $type
* @return string
* @throws NoSuchEntityException
*/
protected function _getUrl($url, $type = UrlInterface::URL_TYPE_LINK)
{
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ composer require aligent/magento2-sitemap-extension

#### Configurations
`Stores -> Configuration -> Aligent -> Sitemap -> Exclude CMS Pages from Sitemap`.

[![Screenshot-from-2023-03-27-17-32-20.png](https://i.postimg.cc/nr6dW3RB/Screenshot-from-2023-03-27-17-32-20.png)](https://postimg.cc/4HQb7QTx)


#### CMS Page Settings
`Content -> Pages -> Edit -> Sitemap -> Show in Sitemap`.

[![Screenshot-from-2023-03-27-17-34-32.png](https://i.postimg.cc/7LVL9csG/Screenshot-from-2023-03-27-17-34-32.png)](https://postimg.cc/zLy5Xd18)


#### Required Steps to exclude CMS Pages from Sitemap

Expand All @@ -34,9 +40,13 @@ composer require aligent/magento2-sitemap-extension
#### Configurations
`Stores -> Configuration -> Aligent -> Sitemap -> Exclude Category Pages from Sitemap`.

[![Screenshot-from-2023-03-27-17-32-20.png](https://i.postimg.cc/nr6dW3RB/Screenshot-from-2023-03-27-17-32-20.png)](https://postimg.cc/4HQb7QTx)

#### Category Attribute Settings
`Catalog -> Categories -> Sitemap -> Show in Sitemap`.

[![Screenshot-from-2023-03-27-17-33-48.png](https://i.postimg.cc/mkqkMHdm/Screenshot-from-2023-03-27-17-33-48.png)](https://postimg.cc/BPTJfXfF)

#### Required Steps to exclude Category Pages from Sitemap

- Set `Exclude Category Pages from Sitemap` configuration field value to "Yes"
Expand All @@ -47,9 +57,14 @@ composer require aligent/magento2-sitemap-extension
#### Configurations
`Stores -> Configuration -> Aligent -> Sitemap -> Exclude Product Pages from Sitemap`.

[![Screenshot-from-2023-03-27-17-32-20.png](https://i.postimg.cc/nr6dW3RB/Screenshot-from-2023-03-27-17-32-20.png)](https://postimg.cc/4HQb7QTx)

#### Product attribute Settings
`Catalog -> Products -> Edit -> Search Engine Optimization -> Show in Sitemap`.

[![Screenshot-from-2023-03-27-17-32-53.png](https://i.postimg.cc/RVVLT5gf/Screenshot-from-2023-03-27-17-32-53.png)](https://postimg.cc/4nqcJMkN)


#### Required Steps to exclude Product Pages from Sitemap

- Set `Exclude Product Pages from Sitemap` configuration field value to "Yes"
Expand All @@ -61,6 +76,8 @@ composer require aligent/magento2-sitemap-extension
#### Configurations
`Stores -> Configuration -> Aligent -> Sitemap -> Exclude Product Images from Sitemap`.

[![Screenshot-from-2023-03-27-17-32-20.png](https://i.postimg.cc/nr6dW3RB/Screenshot-from-2023-03-27-17-32-20.png)](https://postimg.cc/4HQb7QTx)

#### Required Steps to exclude Product Images from Sitemap

- Set `Exclude Product Images from Sitemap` configuration field value to "Yes"
Expand All @@ -74,7 +91,8 @@ composer require aligent/magento2-sitemap-extension
`Stores -> Configuration -> Aligent -> Sitemap -> Sitemap Base Url`.

`Stores -> Configuration -> Aligent -> Sitemap -> PWA Pages Url Key`.


[![Screenshot-from-2023-03-27-17-32-20.png](https://i.postimg.cc/nr6dW3RB/Screenshot-from-2023-03-27-17-32-20.png)](https://postimg.cc/4HQb7QTx)

#### Required Steps to include custom PWA Pages to Sitemap

Expand Down

0 comments on commit 0d90be2

Please sign in to comment.