I have several calls to a getContent() function with arguments that are pulled into the function using func_get_args(). Several of the arguments stay the same, and I would like to set them as a variable to prevent having to duplicate the repeated arguments throughout all of these function calls.
Here is an example of the function call with the full arguments:
<? getContent(
"article",
"display:list",
"find_series:team",
"find_category:pastors-team",
"order:series",
"find_parent_category:team",
"show:<div class='box box_stories'>",
"show:<div class='box_pad box_img bwWrapper'>",
"show:<div class='box_inner_pad'>",
"show:<h3><a href='/staff-detail/__slug__'>__authorX__</a></h3>",
"show:<p class='teamsummary'>__summary__</p>",
"show:<p class='phone_icon'>__authorXworkphone__</p>",
"show:</div>",
"show:</div>",
"show:</div>"
);
?>
Ideally, I would be able to do something like this:
<? $myStyle =
"show:<div class='box box_stories'>",
"show:<div class='box_pad box_img bwWrapper'>",
"show:<div class='box_inner_pad'>",
"show:<h3><a href='/staff-detail/__slug__'>__authorX__</a></h3>",
"show:<p class='teamsummary'>__summary__</p>",
"show:<p class='phone_icon'>__authorXworkphone__</p>",
"show:</div>",
"show:</div>",
"show:</div>";
getContent(
"article",
"display:list",
"find_series:team",
"find_category:leadership-team",
"order:series",
"find_parent_category:team",
$myStyle
);
getContent(
"article",
"display:list",
"find_series:team",
"find_category:executive-team",
"order:series",
"find_parent_category:team",
$myStyle
); ?>
Is this possible? What is the best way to approach this?
Note: I cannot change the getContent() function, it's a core function of the CMS