Dynamically Define a Mura CMS Theme's Display Regions

A question came up recently regarding Mura CMS and how to alter the available content object display regions. This is actually quite simple to control from within the Admin area of the site by going to Site Settings > Select the Site > Select the Display Regions Tab and then choose the Number of Display Regions, select the Primary Display Region and define the Display Region Names as a carrot "^" delimited list.

However, this particular inquisitor was actually interested in how to control these settings from within a specific theme itself. Luckily, as with most things in Mura, it really isn't all that difficult to do.

Since this is not something we would want to happen everytime a page loads, it would probably work best to use the onApplicationLoad() method in the theme's eventHandler.cfc. This way, it will only be executed whenever the entire application is loaded. The next thing we need to figure out is what methods we need to call and how to tell Mura to save our settings.

So, as I've pointed other people in the past, most all of the important methods that comprise the Mura engine can be found under the /requirements/mura/ directory. Since we're dealing with Site Settings, we'll want to review the methods available to us under the 'settings' directory. There you'll find settingsManager.cfc among other files. Within this file, you'll be able to locate a method called update() which takes an argument called data which is required to be a struct/object. The data object should have a key which contains the siteid of the site we wish to edit the settings for. Then, we can update any of the available settings we wish!

Here's some code for you to play around with:

<cffunction name="onApplicationLoad">
    <cfargument name="$" />
    <cfscript>
        var local = {};
        
        // dynamically alter the available display regions from within a theme
        local.data = {
            siteID = $.siteConfig('siteid')
            , columnCount = 5
            , primaryColumn = 3
            , columnNames = 'Test^Left Column^Main Content^Right Column^Footer'
        };
        local.siteBean = $.getBean('settingsManager');
        local.siteBean.update(local.data);
    
</cfscript>
</cffunction>

If you're wondering what settings are available to you, simply do a dump of all the existing values:

<cfdump var="#$.siteConfig().getAllValues()#" />

Hope that helps someone else trying to update their Mura Site Settings from within the theme itself.

Cheers!

Comments
just got to this amazing site not long ago. It’s really very nice and I will only say thanks for sharing this great information with us.View at custom essay writing service Your article is very nice thank you for share this information. It is very useful for all peoples there are all possibilities to provide for this blog.
page if you are interesting on online essay services.
https://www.essaysolution.co.uk/write-my-essay
# Posted By mariakim | 11/18/17 1:12 AM
Incredible posting this is from you. I am really and truly thrilled to read this marvelous post. You've really impressed me today. I hope you'll continue to do so!
# Posted By olymptrade | 5/21/18 7:25 PM
There are such a large number of kinds of articles accessible. I extremely get a kick out of the chance to read the one which you have partaken in this post. Each article has novel and particular characteristics to its write. We can see some same characters in all articles. Writers motivate opportunity to share imperative and convincing data by inquiring about and framing writing thought and altering work to the readers. You have completed an incredible work. I truly making the most of your posts
# Posted By usawriters | 6/28/18 1:21 AM
When fabricating your topics you will need to get dynamic substance from your Mura site to show meta data, titles, body et cetera. For Page level factors, you have to get to the substance scope for that page. This is finished by utilizing content.
# Posted By buy coursework online | 9/19/18 10:22 AM
Here are the many feature to see remembered passwords in microsoft edge in system this is the way for batter working and save the all data and web site to set the password thanks.
# Posted By microsoft edge password manager | 11/12/18 3:46 AM
# Posted By Teri Quinn | 11/17/18 6:14 AM
Woah, this is great work! I wasn't anticipating this from you, and on the off chance that you can please share more insights regarding https://altopdf.com/ with me, I would be grateful. I know a few people who think this isn't the perfect subject to compose on.
# Posted By david | 11/2/19 9:20 AM
All of these techniques for producing a good quality essay can be learned on ie10bethethief. If you are a university student then I think it would be beneficial for you to learn this.
# Posted By ie10bethethief | 11/19/19 7:30 AM
You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site
# Posted By dm ne demek | 12/23/19 2:02 AM
Andhra Pradesh Public Service Commission (APPSC) has Going to Announce Notification 2020 for Lecturers In Government Degree Colleges in A.P. Collegiate Education Service (General Recruitment), Applications are invited soon Online for Recruitment to the post of Lecturers in Government Degree Colleges in A.P. Collegiate Education Service, Proforma Application will be Available on Commission’s Website www.psc.ap.gov.in
# Posted By APPSC Degree Lecturer Eligibility Criteria | 12/24/19 3:18 AM
Nicely well-written article. It was an awesome article to read. Complete rich content and fully informative
# Posted By Phone unlocking Bournemouth | 12/25/19 11:13 AM
Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.
# Posted By Royalgreen | 12/26/19 7:06 AM
Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.
# Posted By Royalgreen | 12/26/19 7:06 AM
You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you
# Posted By Midwood | 12/28/19 2:28 AM
This article is a survey guide for the Whataburger Survey. We will provide you all the information regarding Whataburger survey.

https://whataburgersurveyy.club/
# Posted By whataburgersurvey | 12/29/19 1:15 AM
Many thanks for the exciting blog posting! Simply put your blog post to my favorite blog list and will look forward for additional updates. Simply wanted to write down a word in order to say thanks to you for those wonderful tips.
# Posted By ????? ????? ?????? ????????? | 12/29/19 7:15 AM
A very nice and good post this. I really like it very much. Keep this quality of your work on articles going on and please do not let the quality of your articles fall to bad. Cheers!
# Posted By male massage reviews | 12/29/19 8:32 AM
This is a really good post this. Truly, a magnificent art is making an article. And you are quite a master at that art. I would tell you to keep on continuing this awesome work of yours
# Posted By Best Shower Water Filters | 12/30/19 1:18 AM
That gives off an impression of being brilliant anyway i am still not very beyond any doubt that I like it. At any rate will look significantly more into it and choose by and by!
# Posted By jardin de fiestas en cancun | 12/30/19 6:24 AM
Excellent read, Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work.
# Posted By free instagram views | 12/31/19 5:10 AM
You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site
# Posted By amber park balance unit | 1/1/20 7:02 AM
It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often.
# Posted By treasure at tampines floor plan | 1/1/20 7:32 AM
Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.
# Posted By Best Roofers In Delaware County Pa | 1/2/20 7:04 AM
You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you
# Posted By The Avenir | 1/7/20 1:44 AM
I wrote about a similar issue, I give you the link to my site.    
# Posted By Louis Vuitton | 2/3/20 8:35 AM
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight.   
# Posted By 3ebuy cbd vape cart | 2/12/20 3:05 AM
A great content material as well as great layout. Your website deserves all of the positive feedback it’s been getting. I will be back soon for further quality contents.   
# Posted By AP pharma-d web counselling | 2/16/20 12:49 PM
A great content material as well as great layout. Your website deserves all of the positive feedback it’s been getting. I will be back soon for further quality contents.   <a href=""></a>
# Posted By AP pharma-d web counselling | 2/16/20 12:50 PM
Phenomenal post.This isn't generally horrendous post and gives full information. I like to inspect this post considering I met such a lot of new authentic components concerning it really.Thanks loads. I bookmark your web log in light of I discovered dumbfounding information on your web log, Thanks for sharing.

# Posted By Noson | 2/17/20 11:11 AM
Thank you for sharing a bunch of this quality contents, I have bookmarked your blog. Please also explore advice from my site. I will be back for more quality contents.
# Posted By AP pharma-d web counselling | 2/25/20 10:20 AM
Thanks for letting us know how we can dynamically define a Mura CMS theme's regions here. I appreciate this a lot since I work for https://www.cnet.com/profiles/monikagehts/ company. I can use all of this content in one of my papers.
# Posted By james | 2/26/20 12:03 PM
I am continually amazed by the amount of information available on this subject. What you presented was well researched and well worded in order to get your stand on this across to all your readers.   
# Posted By AP pharma-d web counselling | 2/27/20 2:04 PM
What is the most significant thing throughout everyday life?

It is consistently those significant things in life that we underestimate.
A huge number of things will ring a bell now, however you will in all probability overlook one. It is so basic but then it decides our lives each second.
BREATHING!
Noson® AG has been managing this test since 2013.
As a Swiss startup, we have helped more than 3,600 individuals inhale ordinarily once more.
This reaches from proficient competitors with nasal wing suction wonders to individuals with wheezing issues.
Presently we offer our most recent advancement to the worldwide market so as to support mankind.

# Posted By nose breathing device | 3/1/20 3:38 PM
Thanks for picking out the time to discuss this, I feel great about it and love studying more on this topic. It is extremely helpful for me. Thanks for such a valuable help again.   
# Posted By AP pharma-d web counselling | 3/7/20 2:40 AM
Eyal Nachum is a fintech guru and a director at Bruc Bond. Eyal is the architect of the software that SMEs use to do cross-border payments.
# Posted By Eyal Nachum | 3/10/20 8:51 PM
Eyal Nachum is a fintech guru and a director at Bruc Bond. Eyal is the architect of the software that SMEs use to do cross-border payments.
# Posted By Eyal Nachum | 3/14/20 2:05 PM
<a href="https://udaipurcallgirlsandescort.com">Uda... escorts</a>
I regularly visit this site to check out the events and functions and sometimes for resources. However, it has been a while that you have shared some news about latest or upcoming events.
# Posted By Udaipur escorts | 3/16/20 11:12 AM
Bruc Bond endeavor to lead the financial sector with sustainability, customizable product offering, and open communication. At Bruc Bond we aim to make 21st century banking straightforward, simple, and transparent.
# Posted By Eyal Nachum | 3/17/20 6:10 PM
Bruc Bond endeavor to lead the financial sector with sustainability, customizable product offering, and open communication. At Bruc Bond we aim to make 21st century banking straightforward, simple, and transparent.

# Posted By Eyal Nachum | 3/17/20 6:10 PM
Bruc Bond endeavor to lead the financial sector with sustainability, customizable product offering, and open communication. At Bruc Bond we aim to make 21st century banking straightforward, simple, and transparent.

# Posted By Eyal Nachum | 3/17/20 6:30 PM
<a href="https://www.thewoodleighsresidences-condo.com"... residences</a>
The Woodleigh Residences is a residential property that integrates with MRT, shopping malls and it’s located at Bidadari Park Drive, Woodleigh within the heart of Woodleigh and Bidadari New Town. Woodleigh Residences comprises of a total of 667 units consisting of units from 2 to 4 bedrooms.
# Posted By Woodleigh residences | 3/23/20 3:34 PM
A startup is an organization that is in the underlying industry arrange. Until the business gets off the ground, a startup is regularly financed by its authors. what's more, the startup draws in outside venture.


# Posted By Eyal Nachum | 3/23/20 9:42 PM
Fintech is the term used to allude to developments in the money related and innovation hybrid space, and commonly alludes to organizations or administrations that utilization innovation to offer budgetary types of assistance to organizations or customers


# Posted By Eyal Nachum | 3/25/20 5:22 PM
Hey, this day is too much good for me, since this time I am reading this enormous informative article here at my home. Thanks a lot for massive hard work.   
# Posted By AP pharma-d web counselling | 3/27/20 5:28 AM
Finance is generally related to all types of financial, this could be accounting, insurances, and policies. Whereas banking is everything that happens in a bank only. ... Banking and finance is also referred to as a term of managing your money by investing it in either banks or other financial institutions.

# Posted By Eyal Nachum | 4/14/20 5:13 PM
I regularly visit this site to check out the events and functions and sometimes for resources. However, it has been a while that you have shared some news about latest or upcoming events.
Nose congestion: breathe again thanks to Noson
A stuffy nose is a typical daily problem, especially in the cold season. However, many people are particularly affected by this problem due to anatomical malformations of the nose or functional disorders.


# Posted By dilatateur nasal | 5/14/20 9:11 PM
I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. http://194.32.78.99/
# Posted By Joseph Whitaker | 11/23/20 4:34 AM
Grateful to you for your post; I've been searching for something like this for quite a while https://www.elitepassion.club/call-girls/chepauk
https://www.elitepassion.club/call-girls/anna-naga...
https://www.elitepassion.club/call-girls/egmore
https://www.elitepassion.club/call-girls/guindy
and am really glad to have tracked down it.
# Posted By Annanur Escorts Service | 12/2/22 10:05 PM

© 2023, Stephen J. Withington, Jr.  |  BlogCFC was created by Raymond Camden – Version 5.9.004

Creative Commons License  |  This work is licensed under a Creative Commons Attribution 3.0 Unported License.  |  Hosted by Hostek.com