Octopress choose aside for each page - octopress

I have several pages on my blog that are quite specific and I know exactly what links I would like to appear on the sidebar of each page.
The only way I know how to control sidebar content is to designate certain asides to appear with certain layouts.
In my case, these pages do not each need a unique layout (per-se), they just need a different set of asides. So I am reluctant to create a separate layout for each page just so I can control the asides with more precision.

You are correct, you'll need a new layout in which you can specify specific page_asides. There's a good example of the customizations you'll need to make here: New Plain Page Layout for Octopress

Related

Joomla 3 Overwrite/Change "Menu Manager: Edit Menu Item"

Like the topic say I want to overwrite/change the "Menu Manager: Edit Menu item" layout. To illustrate my question:
In the picture whiche is shown I want to change the labels: Layout, Option, Integration.... and add some other options to it. How can I do it? Or is this even possible?
In order to change the text, simply use language overrides, google is your friend.
In order to add functionality, let's first of all explain what we're talking about to ensure we're on the same page.
Joomla components have views which can have one or more layouts, i.e.
/components/com_content/views/category/tmpl/ contains two layouts, blog and default.
A layout can additionally contain an .xml manifest (in our case, blog.xml and default.xml) allowing us to create a menu item for the specific view/layout combination. The .xml file contains the parameters that the user will set, you can add your own as well.
When you want to change Joomla, usually there is a way to do so without touching the core, which would be pretty bad, as any Joomla! updates would break your work.
For the view layouts a special feature called template override was developed, which allows you to create an alternative to the view layout in a safe place (under your template folder, in this case your admin template), and this is the most elegant and effective way to achieve your result.
Beware though, you are just creating a layout, most likely you will want to add functionality, if it's complex you might be better off creating a dedicated component to keep the code clean. Or you can just put all the logic in your view, query the database from there. But in this latter case, get paid, and run away. Never answer the phone to the customer again.
A final alternative is to write a system plugin that will manipulate the page markup after it was generated in the event onAfterRender(). This is a simple and good approach if you only want to add a button or make minor changes, but if you do anything more than that, see the above advise about running away.

Joomla 3 Article alternative layout

I've created an alternative layout for one of my articles which can be applied successfully, but as has been highlighted in various forums: if you view the article using the Single Article menu type the alternative layout doesn't get applied because of an XML override.
I have a Joomla site that is setup for Sales and Support where the article info such as date, hits etc is useful but on the marketing side none of that is needed, hence an alternative layout would work well.
I want to know how to enable my alternative layout using the Single Article menu type - I've already got the layout how I want it (testing it by having it overwrite default.php) but want to set it up as marketing.php instead and only have it applied to what is needed.
You're probably not going to like this answer because you have already written you're alternate view. If you were rewriting it to begin with, why would you not write in a way that the side bar parameters (date, hits, ect) are within a container that is only loaded conditionally. This way you would only have one view to worry about and a lot less headaches.

best way to handle complex page layout in joomla

I have to convert a static site for a client and it has to retain the exisiting layout.
Fortunately, most of the pages don't have to be editable, so for those I was going to use more or less the existing html.
The challenge I am having is that for many of the pages that do need to be editable, the content is laid out in columns (2, 3 and sometimes mixed)
This ( http://globalstrategies.org/index.php/give/hope-partners ) is an example of a page like that, and you can see others on the site where the layout is relatively complex.
I had thought of creating a jce stylesheet that would at least layout the page in the editor in a reasonable way (a bit like a responsive site, by having the columns stacked one after the other) , but I am concerned that my client may accidentally delete the surrounding classes/divs that create the more detailed structure.
I'm pretty familiar with Joomla and have built quite a few sites, but I've not used an cck tools and was hoping not to have to do that in this case, though maybe now is the time to learn.
Any advice / recommendations would be welcome !
Richard
Maybe ContentBuilder could do in your case, it's fairly easy and creates super-simple code, I've accomplished similar tasks with it. You provide the user with 3 fields (one per column) and create a layout for its display.
Another alternative is possibly even easier: you could override the use of the page functions in a template override of com_content/article, instruct the user to insert at most 2 page breaks, and use the page breaks to build the layout as you require.
If your sites is upgraded to the Joomla 3 you can use the build-in Bootsrap to do the layout.
You can find some more information how you can achieve this in the following page:
http://twitter.github.io/bootstrap/scaffolding.html#gridSystem

Custom section/category viewing in Joomla

I have written some modules to have it look nicely. What I need now is to re-order Joomla's standard viewing of the content. I have looked into com_content, and my first idea was to write my own component for it. But now I realized it would be about 90% a copy of com_content.
The problem is: When you open a link to a section, com_content views a list of the categories. But I want a list of the articles in category News of each viewed, and a link to every article in category Infos on the menu to the left. And of course, view each on click.
Is there a way to achieve that without writing an own component? Or would it be advisable to customise com_content to my needs? I want this done with a minimum of fuss and complexity.
You can override components view-templates in your theme.
In your case, for articles: Articles are part of the content component. components/com_content/views/article/tmpl/default.php is the default view of an article.
To override it copy the file to templates\<yourtheme>\html\com_content\article/default.php.
As an example, see the default theme ja_purity or beez, which also override it.
That way, you will only change the layout and only for your theme. The component will stay in tact and updates will not be as complicated as otherwise.
The visible components on your website are called modules. See the modules section in the admin section. The category-view is one of the default modules. There is also a module to display a list of categories (AFAIK). That is what you want, right? The modules listed in the module section are not all available ones, but all that are created. You can create a new one and set its type to the category-list for example, and define in what block of the theme it should display.
If you want to do your own Module, do so. Code it, then add it in your admin section and you’re done.

changing navigation in magento dynamically

I want to know that can i change the navigation menu dynamically,i am having two tabs on the basis of which i want to render the navigation menu.How can it be done
Thanks in advance
For usability reasons, the global navigation generally shouldn't change. Users will expect to see the same options available to them and will get confused (and leave) if they aren't.
Could you explain the requirement more?
EDIT:
Usability issues aside, try adding all necessary items to the top nav, then use Javascript to toggle between tabs. If you don't want to change the navigation PHTML files to add IDs to them, you can use the existing classes to target which nav items to show and which to hide.
Since Magento stores cannot function without JS anyway, you should be pretty safe with that solution. Preferably, you can change the top nav's template (I believe app/design/frontend/base/default/template/page/template/links.phtml in 1.4) to use IDs for those LIs as well, in which case you can target those instead.
Thanks,
Joe

Resources