Under development Zblog topic Sometimes it is necessary to call the specified classified article to the specified Template Area, then how to call the specified classified articles in the zblog page can be achieved through the following methods.
For the first method, just call the following code at the corresponding location of the template:
{foreach GetList( Number of articles , classification ID, null, null, null, array ('has_subcate '=>true)) as $article} <a href="{$article.Url}" title="{$article.Title}" target="_blank">{$article.Title}</a> {/foreach}
The number of articles and classification ID are replaced with the number of articles and classification ID that you need to call
notes:
"Number of articles" in the code indicates the number of articles displayed in the called list, 5-10 recommended
"Classification ID" to zblogphp Background classification management View the classification ID number to be called
If the code does not call the articles under the parent category, please go to the background, click the website settings on the upper right, select page settings, and open the "List all articles under the category" switch.
Can also cooperate theme Configure the new article field, add switches, enable and call the current article to the specified page, with unlimited number and classification;
{foreach GetList(null,null,null,null,null,null,array('has_subcate' => true)) as $article} {if $article->Metas->umToHome=='1'} <a href="{$article.Url}" title="{$article.Title}" target="_blank">{$article.Title}</a> {/if} {/foreach}
The second call method:
{foreach GetList (number of articles, category ID) as $article} <a href="{$article.Url}" title="{$article.Title}">{$article.Title}</a> {/foreach}
Number of articles Fill in the number of articles you need to call and fill in the specified classification ID