I created with the help of model manager a custom type for my folders and all I want is to have some sort of popup window to fill all the properties and then spread to all the files inside that folder, Is there any relation with the rules of folders and common metadata fields from content? Any help would be apreciated thx
If you configured a form along with your custom model, you should already have a way to edit the custom metadata on your folders.
If you also want that same metadata on your content, then hopefully you implemented your custom metadata on an aspect. The aspect can be applied to folder instances as well as content instances.
Once you have an aspect applied to the folder and content instances, it sounds like the next thing you want to do is copy metadata values from the folder to the content. There is nothing out-of-the-box that will do this for you. You can do this with a rule.
I suggest reading the documentation on the Alfresco server-side JavaScript API and also installing the Alfresco JavaScript Console add-on. You can create a server-side JavaScript file that will reside in Data Dictionary/Scripts. Then you can set up a rule on your folder to invoke that JavaScript to copy metadata from the folder to the documents when the documents are created.
Keep in mind that if the metadata on the folder changes you will have write a rule to deal with that if you want to copy the updated values to the content instances in the folder. This could get very expensive if the folder grows in size.
Related
I want to edit the style of multiple applications inside my workspace with the less amout of effort. What I mean by "edit the style" is font size, background color, position, etc.
My idea was creating a CSS file at "Static Workspace Files" with the classes I want and applying them to the apex items needed. Applying this in a region for instance:
*.font16{
font-size: 16px;
}
The problem is: modal pages can't find the file, which is not a problem in nomral pages. I'm using the path '#WORKSPACE_IMAGES#styles.css' in the page "CSS > File URLs" setting.
I'm not sure if this is the right approach, maybe I should edit Themes or Templates, but since I'm pretty new to Apex I chose CSS for familiarity.
Application Express v20.1
That's what Static Workspace Files are meant for, files that can be used by multiple applications in the same workspace.
The easiest approach for this is to create a CSS, like what you've done.
You don't need to inlcude the file in every single page, which would become a maintenance nightmare eventually.
You can simply include the file at the application level:
In Share Components, go in the User Interface Attributes and include the file under Cascading Style Sheets.
I usually have one global.css file (as a static workspace file) for anything common to all my apps and one app.css per application (as a static application file) for things specific to the current application.
Note that application exports will contain the static application files, but they will not contain the static workspace files. You will need to export/import them yourself.
Did you try Theme Roller? Run the page, it is down in developer's toolbar.
i need your help, I have created in Share a new type folder, called "TanFolder". it's on documentLibrary. I would like, when i create this folder, three other folders will be created automatically within it
Example: every time i create a TanFolder three folders will be automatically created in this tanFolder
the problem is that, I do not know where I need to make code changes
thank you
Several approaches are possible. It depends on the use case.
You can use space templates. These are defined in Data dictionary/Space templates and can be added in any site using the Create button in the toolbar. Just create a folderstructure once inside the space templates folder and you can reuse it every time. No code changes needed.
Or you can create a custom Rule for your new content type which executes a javascript that creates the subfolders every time a new TanFolder is created. Would require just a small javascript. The rest is condiguration.
A third approach is to use Alfresco Behaviours. This requires some java code and a bean declaration. If you are starting with Alfresco I would try the first two approaches first.
When I clear my theme registry Drupal runs off and builds out a nice consolidated css file, but it does this for different node/page types so that I get several instances of said file existing. I mentioned this in another question I asked (and answered), but my question is, how does Drupal deduce what css files it needs to add to the consolidated version? There must be numerous different places that control what modules appear on a particular node, so what constitutes a rule for another css file being built?
Well that wasn't an easy chain of functions to follow but I think I've got there...
Every time a page is 'refreshed' (i.e. built from scratch, not served from cache) all CSS files added with drupal_add_css() during that page build are aggregated and saved to a single file that is returned as the <link> tag for that page.
The following line in drupal_add_css() decides what the aggregated CSS file's name will be:
$filename = 'css_'. md5(serialize($types) . $query_string) .'.css';
$types in this context is an array of all of the CSS files added using drupal_add_css() during the current page build. The filename for the aggregated CSS contains a serialised string of $types, which essentially means that any other page that adds the same CSS files as that one will receive exactly the same file name and thus load the same CSS file.
So basically, the aggregation function is run for every single page build so all CSS added to that page will be aggregated every time. If certain pages happen to use the same modules then they will automatically be served the same CSS file as defined in the PHP snippet above. When you combine that with page caching you get the results you find in the HTML source on the different pages.
Hope that makes sense!
I am building up a website using MVC architecture. It takes a lot of css with it. I require atleast 20 css files to store within it each associated with some unique views. I want to know where can I store the css files? Either in a single root css directory or shall I store it with a particular view. Also linking these files within the common template file would be tedious enough. I mean it would show up 20 different tags. Is there any alternative way to do this? Please help. I am using codeigniter framework by the way.
What I do is store it all in a css folder inside the public folder (the one that houses your index.php file). I also have a helper method that generates the actual link tags, so in the template files, I just have something like:
<?= stylesheet('sheet1','sheet2','sheet3') ?>
The helper method that calls would then make the links (and assumes that they're in the public/css directory).
That cleans up the raw template files, though it does still make multiple tags in the files themselves. I use partial views, so there's a master view that has the main CSS file(s) that are used on every page (or almost every page), then add in on each template the ones that are unique to the view.
If you have 20 CSS files, you might want to go through and see what you can tidy up and make more generic. Any place where you have more than one of the same styles (even across files) is up for the chopping block. Any extra files should be relatively small and provide only overrides for the exception pages (and if you can genericize those more, so you use a file for more than one page, then that's even better).
I would recommend you to combine all the CSS files in a single file. Its easier to maintain and you will have only one request to the server. Having so many css files will only increase the loading time of your page. Also gzip the css files to increase the page speed.
I have been using a custom template file called user-profile.tpl.php for a while. But wanted to explore the CCK Content Profile abilities.
I renamed the template file to something arbitrary, but instead of drupal defaulting to using the standard profile view it is complaining that it can't find the user-profile.tpl.php file.
So either it saves this in the database somewhere, cache is disabled so that is not the Anyone know how drupal save the template file names? And how that can be reset?
Make sure you flush the theme registry whenever you make a change like that. You can do it using the link in the top left of admin_menu if you're using that module, or if not, go to Settings -> Performance and clear the cache.