Adding the MainMenu to Joomla 1.6 Template - joomla-template

I tried to install some free Template from the Joomla 1.6 CMS.
Every Template (and every tutorial) i downloaded cannot show the main Menu on the left site.
There are this Lines in index.php file:
<?php if($this->countModules('left')) : ?>
<div id="sidebar" class="grid_<?php echo $leftcolgrid;?>">
<jdoc:include type="modules" name="left"style="xhtml" />
</div>
<?php endif; ?>
How can i set up to show the Main-Menu on the left site for Joomla 1.6?

I do not have much experience in 1.6 but in 1.5 the PHP code has really nothing to do with it. it all depends on where you positioned the module that contains the main menu.
so do this:
Go to admin panel Extensions > Module Manager.
Look for main menu, you should see the position in the table. if it does not say left then go into it and select left. Save.
If it does say left for position, go in and make sure you have selected the correct menu to reference in the right column. it's under Basic options.
Another thing to check in firebug(if you don't have it, get it. it's almost a standard.) but make sure in fire bug that your div#sidebar is showing up, if not then there is a problem with your if statement.
Hope this helps.

Related

grails fields plugin <f:display is 'chopping off' bootstrap dropright action with a table of values

grails v 3.3.9, fields plugin
fighting with fields plgin and theres a problem when rendering domain objects and using bootstrap
i've got a sample here from a simple standalone page to show the problem
<p>f:display category </p>
<f:display bean="maintenanceAgreement" >
</f:display>
<hr />
<p>f:field category</p>
<f:field bean="${this.pageScope.maintenanceAgreement}" property="category">
<g:render template="/_fields/map/displayWidget" ></g:render>
</f:field>
<hr />
in essenence i have added a template in "/_fields/map/displayWidget" that renders a drop right table on a button
when you render a map field directly from your Domain object the sample table opens and you get all of the table
however when you
you can see the differences between using f.display (has clipping problem), f.field ( which seems to work) and f.all that ignores my _fields/map/_displayWidget.gsp
I dont want to have not use the fields plugin but its not working with bootstrap templating
has any one come up with a fix for this problem?
the project demo page is here
github standalone page to show rendering problem
the attached shows the output as you try each and select category property
well goldarn it another 2 days down the pan - but i have it !
I thought at first it was something to do with fields plugin processing. so i hacked a clone of plugin project locally and added some bits so i could watch it/debug step through it
in doing so i noted that my dummy web domain class page i'd cut across to the plugin didnt have the clipping problem. but the styles were not the same so i copied main.css and grails.css from ordinary project back into the plugin, then re rendered in the browser - and the clipping happened again.
so its in the css!. some very careful watching of browser and looking at the browser 'inspect' indicated that the clipping seemed to be enabled very early on in the journey.
so in my dummy page i just used
I then spent a day wandering round the various bits of fields plugin as its not that well explained anywhere.
if you look at the plugins taglib display method, by default that triggers the /templates/fields/_list.gsp. naming is a little odd but its the gsp that renders the domains persistent attributes as an ordered list - the plugins default _list.gsp looks like this
<ol class="property-list ${domainClass.decapitalizedName}">
<g:each in="${domainProperties}" var="p">
<li class="fieldcontain">
<span id="${p.name}-label" class="property-label"><g:message code="${domainClass.decapitalizedName}.${p.name}.label" default="${p.defaultLabel}" /></span>
<div class="property-value" aria-labelledby="${p.name}-label">${body(p)}</div>
</li>
</g:each>
</ol>
so after much exploration coming up through templates, from the bottom I ended up right at the top with the '
so nearly there now. back into main.css that i'd copied in. if you edit that, down around line 215 you get this style. If you comment out the overflow property - its all fixed !
.property-list .fieldcontain {
list-style: none;
/*overflow: hidden; */
zoom: 1;
}
I tried auto, scroll, and visible but that seems to much about with too much of the page so best to just comment it out.
once you do that - the rest of the rendering of your forms starts to work !! blimey one line of css for all that pain. Attached is the page using
Lastly through out all this, id ended up digging through /tracing fields plugin. What a nest that is. Not really finished here, but basically
with no body just renders a label and no content. So you either need to provide provide a body tag, say to get the value field displayed.
as
if no widget template has been defined then the renderDefaultDisplay is called which again has very limited options for controlling the rendering by falling through a 'switch (prop.type)' and basically calls either g.format (bool), g.formatDate (but no LocalDateTime/LocalDate Support) or g.fieldValue, non of which are bootstrap enabled.
if you call
these two diagrams are not beautiful but just high level pseudo code walk through for what the core tags are trying to do. One day i'll try and pretty that up but it might help you if you get stuck
I'll raise a bug for the main.css clipping directly to the grails team and see what happens, but you can comment the line out yourself if you fall foul of it.

Automatically add current url before print instruction in Joomla article

I want to manually add a [Print] icon in the position of my choosing in a Joomla 3.6 article. This article will be used as a 'master' which will be copied and renamed on a weekly basis so I would like the reference to the article in the URL to be automatic. Something like this:
<div class="btn-group">Print Preview</div>
I tried using # to reference the current page etc but this meant that the entire content of the page was (all modules, headers, footers, etc) were displayed in the print preview as well as the current article.
Thank you.
p.s. BTW, "Joomla3.6" isn't a valid tag yet so I couldn't add it with my reputation of just 1!
Not sure about your goal to "Manually add a [print] icon".
The normal way:
In the joomla /adminstrator , in the menu under Content->article, in the options on the right, there is a "Show print icon" - option. This will show the print icon for all articles. You might need to style it to suit your need. This can also be configured on a per-menu - basis.
Optionally:
You could override the default output of the article template (More on output overrides here) and add the print icon wherever you need it:
Copy the file /components/com_content/views/article/tmpl/default.php to /templates/yourtemplate/html/com_content/article/default.php
Add the print icon somewhere: <div class="btn-group"><a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" ... >Print Preview</a></div>
But, you can probably use the first method. Or perhaps just move the current output of the print icon in default.php, using the override method described above.

YouTube subscribe link

I am a new coder/web designer and i am trying to add a the youtube logo that when clicked confirm subscription to the users channel
i have a php file with the following coding within...
<div id="youtube">
<img src="/images/YouTube.png />
</div>
this links to confirm subscription and the image directory is correct
however the problem is that whenever i add this into the coding it stuffs everything up!
if you go to any page and right click and go 'inspect element' you will see that the like box for facebook has a box around it which has the room for the youtube picture link
but it doesnt work, as said, when i add it in everything just clumps up together and/or the menu clumps up and goes all weird
You had two problems by the looks of things. The first issue was your include filename was wrong and the second was that you missed the closing inverted comma "
This was on the img src= tag
Try to change your id to something else - like <div id="youtube-confirm">
The youtube id might be reserved in FB script and it messes up your and their stuff

In a Rails app, how can I make a link load in a div as opposed to refreshing the whole page?

I'm still a beginner at web development. It's not my profession. So go easy.
I started building a rails app today, and realized it would make my application so much better if I could get certain links to display in a separate div instead of a new page, or refreshing the entire page. I'm not quite sure how to search for this, and I keep chasing red herrings with google.
Basically, I have a list in a div on the left side of the page, and when one item from that list is clicked, it should appear in the right div. (Nothing else on the page need be changed)
That's really as simple as it is. Do I need to use Javascript for this? Can I get away with the rails js defaults, or should I be using JQuery?
Is there a way to do this without javascript? I really just need a push in the right direction here, I'm tired of not even knowing how to search for this, or what documentation I should be reading.
Like I said, go easy, and you should just go ahead and err to the side of caution, and assume I know nothing. Seriously. :)
Thanks in advance,
-Kevin
(By the way, I'm developing with Rails 3)
Create your views (along with controllers) to be shown inside the div for each item on the left menu. Lets say we have the following structure now:
Item1 (Clicking on it will fetch:
http://myapp.com/item1)
Item2 (Clicking on it will fetch:
http://myapp.com/item2)
and so on...
make sure you only render the html to be put inside your content div. Should not include <head> <body> etc. tags
In your main page you may have your markup like this >
<div id="leftMenu">
Item 1
Item 2
</div>
<div id="content">
Please click on an item on the left menu to load content here
</div>
Finally, add the following Javascript (you'll need jQuery; trust me it's a good decision).
$("#leftMenu a").click(function () {
$("#content").load($(this).attr("href")); //load html from the url and put it in the #content element
return false; //prevent the default href action
});
You will need JavaScript if you want to avoid reloading the page. You can use link_to for links in your lists, and you'll need to use :remote => true to make it send AJAX requests to the server. The server will need to respond appropriately and supply HTML for your div.
link_to documentation is here: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to (and admittedly it isn't very useful for AJAX functionality).
The last post in this thread shows one possible solution you could use.

NerdDinner main logo link

I have uploaded the nerddinner sample to "www.example.com/test/nerd". When a mouse is on menu tab such as "Find a host" then the link is shown at the bottom of Internet explorer as "www.example.com/test/nerd/Dinner" with the contoller name "Dinner". When the mouse is on the main logo which is on top and left, the link shown as "www.example.com". So it direct me to "www.example.com" instead of "www.example.com/test/nerd"
Where can I change it? I have tried to change the "start url" from the application property, but it did not work.
The NerdDinner application links to the / path when you click on the logo. This points you to the domain root: example.com.
If you want the link to point to your home page instead, there are two ways of doing that:
Have the link point to ~ instead - that's the application root. If you configure the directory you installed NerdDinner in as an IIS application, the controller action with the "" route will handle the request.
Change the <a href="/" to point to your controller action by name: <a href="<%= Url.Action("Index","Home") %>"
Both ways work, but I recommend using the first one, because it will point to whatever action is routed to ""; in other words, if you change the name of your home page action, for example, the link will still work.
This application assumes that is installed in the root of the domain, and therefore just contains the path "/". You'll need to edit NerdDinner/Views/Shared/Site.Master. The line you need to touch is
<h1></h1>
Try changing this to
<h1></h1>
I don't have ASP.NET set up anywhere I can try this, so it probably won't work as is. Hopefully that will at least get you started if it doesn't work perfectly.

Resources