Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are two possiblities - </p> <h2>Case 1:</h2> <p>You are running a static website then you can find all your HTML inside 1 folder - protected/views/site/pages <a href="http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/" rel="nofollow">http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/</a></p> <h2>Case 2:</h2> <p>Website is dynamic. Tasks such as generating and regenerating Sitemaps can be classified into background tasks.</p> <p>Running background taks can be achieved by emulating the browser which is possible in linux using - <strong>WGET</strong>, <strong>GET</strong> or <strong>lynx</strong> commands</p> <p>Or, You can create a CronController as a <strong>CConsoleCommand</strong>. How to use Commands in YII is shown in link below - <a href="http://tariffstreet.com/yii/2012/04/implementing-cron-jobs-with-yii-and-cconsolecommand/" rel="nofollow">http://tariffstreet.com/yii/2012/04/implementing-cron-jobs-with-yii-and-cconsolecommand/</a></p> <p>Sitemap is an XML which lists your site's URL. But it does more than that. It helps you visualize the structure of a website , you may have </p> <ul> <li>category</li> <li>subcategories.</li> </ul> <p>While making a useful <strong><em>extension</em></strong>, above points can be kept into consideration before design.</p> <p>Frameworks like <strong>Wordpress</strong> provide way to generate categorical sitemap. So the metadata for each page is stored from before and using that metadata it discovers and group pages. </p> <p>Solution by Reflection suggested by <strong><em>@Pavle</em></strong> is good and should be the way to go. Consider there may be <strong>partial views</strong> and you may or may not want to list them as separate links.</p> <p>So how much effort you want to put into creating the extension is subject to some of these as well. </p> <p>You may either ask user to list down all variables in config fie and go from there which is not bad <strong>or</strong> you have to group pages and list using some techniques like <em>reflection</em> and <em>parsing</em> pages and looking for <em>regex</em>. </p> <p>For ex - Based on module names you can group them first and controllers inside a module can form sub-group.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload