Our case is inserting multiple orders related to single Customer_Id. The ask here is that we would like to use a complete AMPscript block, if possible, instead of combining inline and block-style in our 'for' loop case, so we could invoke the variables without inserting the AMPscript code as part of the content block. Basically, like we do in other 'lighter' versions of AMPscript and simpler lookups. Here's how our content block looks like with combination of block+inline AMPscript code:
<ul>
%%[
VAR @lineItems, @countLineItems, @Customer_ID, @i, @row
SET @CIP = AttributeValue('Customer_ID')
SET @lineItems = LookupRows('Orders','Customer_ID',@Customer_ID)
SET @countLineItems = RowCount(@lineItems)
IF @countLineItems > 0 THEN
FOR @i = 1 TO @countLineItems DO
VAR @row, @item_description, @Quantity_ordered
SET @row = row(@lineItems, @i)
SET @item_description = field(@row,'ITEM_DESCRIPTION')
SET @Quantity_ordered = field(@row, 'Quantity_ordered')
]%%
<li>%%=v(@item_description)=%%, ordered quantity: %%=v(@Quantity_ordered)=%%</li>
%%[ NEXT @i ]%%
%%[ ELSE ]%%
%%[ RaiseError('No Rows Found!') ]%%
%%[ ENDIF ]%%
</ul>