Yii layout in controller - layout

i'm a new one in Yii :)
I'm trying to generate CRUD structure with Gii and everything ok.
But i'm a little confused about overriding layout path in controller.
public $layout = '//layouts/column2';
How to explain such path, especially "//" part?

Have a look at the documentation for CController::getViewFile(). It explains the // and other view path options.

It means that the template file column2.php has to be found under the default view directory for the application. That is : protected/views

Related

How to Change the Admin logo in Broadleaf

Hi please help to change the admin logo in broad-leaf. and where the images and templates are located in admin. i have already done searching the file structure but i wont find the images folder there. please help to solve the issue thanks in advance.
You also need to change configuration in AdminSecurityConfig.java to enable "/open_admin_style/img/**"
#Override
public void configure(WebSecurity web) throws Exception {
web
.ignoring()
.antMatchers("/**/*.css")
.antMatchers("/**/*.js")
.antMatchers("/open_admin_style/img/") // <-------
.antMatchers("/img/**")
.antMatchers("/fonts/**")
.antMatchers("/**/"+assetServerUrlPrefixInternal+"/**")
.antMatchers("/favicon.ico")
.antMatchers("/robots.txt");
}
The admin templates are packaged. Example, in my case, they are here:
C:\Users\myuser\.m2\repository\org\broadleafcommerce\broadleaf-open-admin-platform\5.2.0-SNAPSHOT\broadleaf-open-admin-platform-5.2.0-20170707.134303-195.jar!\open_admin_style
You will have to override the admin templates by following the same folder structure found in the directory I mentioned above, but replicated in your admin project under /src/resources.
For example, you can place your modified loginLayout.html here:
admin\src\main\resources\open_admin_style\templates\layout\
Your loginLayout.html could contain /img/admin/your-company-logo.png , and have the logo placed here:
admin\src\main\resources\open_admin_style\img\admin\your-company-logo.png
Edit: I might be wrong but it might be important to have similar file names in this simple overriding case.

Orchard Projection Isotope

I'm trying create an affiliate directory on my Orchard site. The directory is populated by running a query on my custom Content Type. The directory needs to be sortable and searchable. I've set up a basic jsfiddle here that is a basic functioning version of what I'm attempting to do, but it's just in html: http://orchard1.pha.jhu.edu/affiliates-beta-2
Or you can view the jsfiddle here: http://jsfiddle.net/tgelles/AMZf8/
Has anyone discovered a way to best use isotope on an Orchard Projection? I've downloaded the Projection Layout module, but I have no idea how to use that/where to inject the specific isotope code. I've also created alternate template files for the Projection's Summary display, but I don't know how to best inject the isotope plugin into that razor file.
Any help would be appreciated.
The best way would be creating a shape, but You could easily edit the query template and inject the js through a custom view for that projection(url,type, etc)
Check in your Queries.
There was a video which helped me understand better how they work: http://www.youtube.com/watch?v=Ka55wTTXZg8
Hope it helps.

Joomla - Custom component url rewrite

I have the following component #
?option=com_tmportal&module=user&task=main
I've enabled url rewriting and setup the htaccess file which is all working correctly, how would I create a rewrite rule that allows me to access the component above by simply doing:
/portal/ = ?option=com_tmportal
or
/portal/user = ?option=com_tmportal&module=user
or
/portal/user/main = ?option=com_tmportal&module=user&task=main
Thanks for any help, much appreciated :)
You haven't specified Joomla version so I'm assuming 1.6/7/2.5 in my answer.
Short Answer: If you're using Joomla!'s default .htaccess then all you have to do is create a Joomla! menu to each of your components views with the right alias eg. portal for your default component access ie. ?option=com_tmportal.
This is what the default .htaccess does it passes all of the elements after the base URL to index.php to help select the component and view.
Longer Answer
When you create a component for Joomla! you specify the menu settings for each view using an XML file usual the same name as the view file in it's view/tmpl/ directory.
Typically the url to a specific view & task in a component would look like these:
?option=com_mycomponent
?option=com_mycomponent&view=userdetails
?option=com_mycomponent&view=userdetails&task=main
Joomla!'s framework will automatically use the view & task params to get your components correct controller and view (or sub-view). I'm not sure that it does anything with the module param that you have in your URL's so I'd guess you're trapping and processing that yourself.

Webmatrix Layout -- Inserting into head?

I've created a web site using Asp.Net and the Razor view engine (which is the same as using WebMatrix). Up to now, I've been using SQL to query databases directly, but now I have a page which needs to query a WCF service that returns XML (getting that to return JSON or ODATA maybe is for a separate question).
On doing this, I was looking at the best way to do this, and it seems that jQuery may be the answer (unless you have other thoughts).
The problem is I'm using SiteLayout using the Layout="~/SiteLayout.cshtml" and I can't work out how to override or insert extra information specific to this page into the head tag that is in the SiteLayout, such as the script I need to add?
I'm pretty sure I'm thinking about this wrong, so if anyone has the answer to point me in the right direction, that would be great.
Thanks in advance for any assistance.
You can to define a Head section in the child pages:
#section Head {
<script> ... </script>
}
You can then call RenderSection("Head") in the <head> in the layout page to render this section.
You may want to pass , required: false.
For more information, see ScottGu's blog post

Customizing Sharepoint Search Box

I followed some tutorial to change the way Sharepoint Search Box is shown on screen.
My first problem is, after modifying the SearchArea.xml file, is there a way to force the reload? The frequency of reload seems very random.
Bonus question: is it the best way to do it?
It's the easiest I've found, but having to change the file on the client's production server when the project is deployed doesn't seems very optimized.
For the first question, you need to reactivate the feature to have it instally reload, check this link in msdn
The second question, I just answered in another post, check it out
Its very straight forward. All you have to do is create your custom CSS file and have it override the default styles from the corev15.css file.
The class for the Search inpubt Box is .ms-srch-sb
And you can use your custom styles something like:
.ms-srch-sb>input {
/* your custom css style*/
}
Hope that helps.
Cheers

Resources