Hi
Sorry if this is not supported here, though a lot of the configuration in our instance of Teamsite is PHP.
Ok, my problem.
The code below is basically selecting all the pages from Teamsites Navigation, which is in a mysql database. I'm generally showing all the latest articles with some html wrapped around for layout.
<div class="article-grid">
<?php
// get all pages
$pages = new TFW_Navigation($pageNav);
$pages = $pages->getNavigation();
foreach ($pages as $index => $topPage)
{
$children = $topPage->getChildren(null,true);
if (!empty($children)) {
foreach($children as $child) {
?>
<article class="<?=$child->ext_column_1 ?>">
<a href="<?= $child->url ?>" class='article-border'>
<img src="<?=$child->ext_column_2 ?>" alt="">
<header>
<h3>
<?= $child->ext_column_3 ?>
</h3>
</header>
</a>
</article>
<?php
}
}
}
?>
</div>
What I need is to query/reference the XML/DCR and instead of showing all pages, only show the pages from the multi-select in the capture form, which outputs in DCR, example of the item below.
<item name="related_articles">
<value>22</value>
<value>29</value>
</item>
I'm wondering how I can add or change the code so I query the articles DCR, then query the Navigation to show the pages only for the page values 22, 29.
Hope this makes sense, any information or suggestions how I can do this?
And if a better way than PHP happy to try.
Thank you,
Barry