Created
March 17, 2010 19:36
-
-
Save aarongustafson/335632 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:weblog:entries weblog="services" | |
disable="categories|category_fields|member_data|pagination|trackbacks"} | |
{exp:query sql="SELECT @row := 0"}{/exp:query} | |
{exp:query sql="SELECT @row := @row + 1 AS `query_count` | |
`project`.`title` AS `project_name` | |
FROM `exp_weblog_titles` AS `project` | |
INNER JOIN `exp_relationships` AS `service_projects` ON `project`.`entry_id` = `service_projects`.`rel_parent_id` | |
WHERE `project`.`weblog_id` = 13 | |
AND `service_projects`.`rel_child_id` = {entry_id} | |
LIMIT 10"} | |
{if query_count=="1"} | |
<ul> | |
{/if} | |
{if query_count!="10"} | |
<li>{project_name}</li> | |
{/if} | |
{if query_count=="9"} | |
<li>…and many more</li> | |
</ul> | |
{/if} | |
{/exp:query} | |
{/exp:weblog:entries} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment