How to find the No Of Layout Function in a Page


Dear Team,

Can you please give me the syntax to find the no of layout functions in a page.


Phani Kumar R.V

Jul 08, 2010 17:41

You can get all the functions on a Composer page and then iterate through them to find the number of layout functions.

There is a blog post the EDB/DropIt blog.

Not exactly what you want, but the approach can be useful. Good luck!

// Make sure that the current page is an Composer page
        if (this.CurrentExtensionPageData != null)
            ContentFunctionData currentContentFunctionData = new ContentFunctionData(this.ContentFunctionLink);
            // Loop through all content areas in the page
            foreach(ContentAreaData ca in this.CurrentExtensionPageData.ContentAreas)
                // If any of the content areas contains the current content function it means that the function is placed directly on the page
                // - it's not placed in another content function
                if (ca.ContentFunctions.Contains(currentContentFunctionData))
                    return false;
        // If we reach this code it means that the content function is placed in another content function
        return true;

Sep 22, 2010 21:27
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.