Apply an alternative layout on frontend created articles - joomla

I created a Create Article menu Item Type and need to apply an alternative layout to all article created using this frontend form. But Joomla not provide this option. How can I do that?

It's basically a business decision what fields to allow or not allow to be modified from the front end but in general the thinking is that too many complex choices in the front end is not a great idea, but for your business logic that may make complete sense. Take a look at how the display of image and links fields in the front end are turned on and off. You could override the edit layout and bring some more fields forward probably.

Related

Load a XAML Layout dynamically based on User interaction

Good day, I am quite new to windows phone and so please bear with me. I have a requirement to load a XAML layout based on what the user chooses. For example, if i have 4 XAML layouts A, B, C, D, when the user chooses C, the respective XAML layout should be loaded and if A is choosen later, that should come up. I can create different XAML layouts and use the OnNavigateTo Method, but i think its not very efficient. Is there a way, i can group the XAML Layouts together so that it can switch between them easily?.. I have heard of using templates, but can't really find any concrete example of how it works. Any help or links will be greatly appreciated. Thank you.
From my understanding you do not need to use templates. Since there are four different actions that have four different views associated with them, there shouldn't really be a problem with having a separate page for each action.
The problem might also be this - how different are the layouts? If data is the only thing that changes across them, you might think about having a view model to bind to and simply change the bindable source.
Bottom line: just use pages, or a single page bound to dynamic data, depending on your scenario.
In my knowledge , I ask you to prefer the UserControls implementation in your UI. You can have A,B,C and D layouts as a separate UserControls and can have those UserControls in the same page. Just make the visibility changes based on the condition that recognize it in the code behind. I think it may help you.
You can solve this in many different ways. If you are not supposed to load the layout on the same page, create 4 separate pages for each view and navigate to correct page.
If you are required to update the current view, you can choose one of the following:
- Place all four layouts into each own Grid and set Visibility="Collapsed" for each one. Then, when you need to show a layout, simply change its Visibility to True.
- Same as above, but use Visual States to add some animations.
- Create 4 user controls and dynamically create the one you need and add it to the current page.
You need to account for several factors here:
- Clean code and clean design.
- Animations and transitions.
- What about Back key? If user is supposed to navigate back to selection screen once he is done, consider navigating to separate pages.
Don't forget the last point, it may be crucial when choosing the right solution.

Adding custom fields to the article component

I've recently added custom fields to the article component using the documentation in the following url:
http://docs.joomla.org/Adding_custom_fields_to_the_article_component
Now this adds the custom fields defined to every new and existing article. Is there a way to define custom fields for specific article layout overrides.
Example:
If I have custom layouts for the category blog, (news, portfolio, events) can I define different custom fields for each category when creating a new article?
Kind of the way custom post types work in wordpress, or the way k2 component works, can this be done in joomla alone?
This is considerably easier to manage in K2 since the functionality is built in to do specifically what you want. It is trivial to assign extra fields to each category without having to go through the much more complex process described in your link.
However, if you want to stick with com_content, then you will need to create alternative layouts for displaying each category. You will still have all of the custom fields show up in the admin, but you can control the display on the front end with the alternative layouts. Here is the documentation (it's the same for 2.5) - http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6#Introduction_to_Alternative_Layout_Feature_in_Version_1.6

Best / Easiest recommended approach for news feed vertical column menu in Orchard

i'm new to Orchard but very impressed with it. I've been trying to find an easy way to have a vertical column based menu in Orchard. Because there is a lot of features and options i'm reluctant to take the wrong approach. I'd like to go in the right direction on this one by asking the experts
I just want an image (to the left) and short paragraph to the right. This repeating downwards just like many popular newspaper websites
Exactly like what http://www.dailymail.co.uk/home/index.html has at the right of the page...
Many thanks for the advice, Kind REgards, J
I tend to solve this by adding these fields to blog post:
media picker field (I tend to call this field "Teaser image") used to select picture that will be shown in the news feed
text field (I tend to call this field "Lead") with Html flavor used to add short text paragraph, or lead, that will be shown in the feed
Afterwards, you can, either
add Recent blog posts widget to the zone where you wish your news feed to display or
create a Query that will return posts you want to be shown in the feed and then add Projection widget to the zone where you want to display your feed
You can see the similar design I created for the Croatian NATO portal with some extra fields in the design. It's in Croatian language, but it'll serve the purpose of showing what you can do with Orchard for your news-portal style web site.

how can I set up a form with dynamic fields according to user input?

I set up a simple form with Chronoform V4. One of the field need to be kinda dynamic.
for example,
do you know your id, if yes, then input id.
if not, then there are other filelds need to be filled, such as name, birthday, sex etc.
but if you know the id, those fields should be grey out or something etc.
How can I do this in joomla? Many thank
Your best bet? Hop on the forums over at www.chronoengine.com - not only are the developers super friendly, I have seen them custom code stuff for their users more times than not.
They know the stuff best and will definitely be able to help you.
That said, there are ways to add custom code snippets to chronoforms - I recommended using javascript to accomplish your goal. I have done something similar and chronoforms + javascript = wonderful result.
If you've created your form with their wizard, go into your forms and click Wizard Edit.
From there on the right hand side you should see an 'Events' tab - click that.
In the 'On Load' event, you'll want to add 'Load JS' from the menu on the left. Then you can open that, and add your javascript to control your choices. The javascript will load when the form does and you can control the user selections exactly how you're requesting.

PHP:Magento How to show configurable product's option like grid in place of default dropdown

I want to change the default behavior of the configurable products option. By default it shows options in a dropdown box; I want to show that on a grid in place of the dropdown.
Creating a new product selector is a pretty big undertaking. I cannot tell you how to turn it into a grid because you have to handle multiple selections, etc. But what I can tell you is that the file you are going to spend a lot of time in is:
/app/design/frontend/base/default/template/catalog/product/view/options.phtml
I have done something similar.
The main Problem you will face is to make it work with the magento javascript components, so you can still use all functions which are provided by Magento.
As this is nearly impossible not to breake, i used a script, which places an own html control over the selectbox.
https://github.com/claviska/jQuery-SelectBox
This is mainly for customice Design of a DropDown box, but you can "misuse" it to have arbitary structures, as you have usual html elements you can place how you wish with CSS.
You could try looking at using a plugin such as this one by Magento Mechanics which will do all the hard work for you:
http://www.magemechanics.com/product-grid-options.html
I have used and recommend there plugin.

Resources